Database locking issues
Before it writes, the platform claims the output database with a lock, so two runs can’t write to the same output at once. These are the two errors that lock can cause.
[WARN]: Synthesized Platform is unable to obtain a lock.
The platform’s database user can’t create the lock object in the output database. Grant the output permissions, and these:
For MySQL:
Additionally grant create, select, insert, and drop permissions on tdklockholdingschema schema.
grant create, select, insert, drop on tdklockholdingschema.* to "${user}";
For Oracle:
grant
create any procedure,
drop any procedure
to ${user};
[FAILED]: Failed to claim sink. Synthesized Platform is already running.
The output database already has a lock. Either another run is writing to the same output now, or an earlier run stopped abruptly and didn’t release its lock.
-
If another run is writing to it, wait for it to finish, or give this workflow a different output database. Two runs at the same time need different output databases, even on the same server.
-
If no run is writing to it, release the lock as described below.
| If you are sure that Synthesized Platform is not running, you can manually release the lock. |
You can do it either by specifying flag FORCE_CLAIM_SINK (see configuration flags.) or by manually releasing the lock in the output database:
For MySQL, MSSQL, H2, PostgreSQL:
drop table tdklockholdingschema.tdksinkclaimtable;
drop schema tdklockholdingschema;
For Oracle (execute as Synthesized Platform user):
DROP FUNCTION tdk$claim_function;
With the TDK CLI, release the lock with release-lock:
tdk --output-url <jdbc-url> --output-username <username> --output-password <password> release-lock