Then the record in DB will remain
locked and needs to be fixed manually. Actually the same behaviour
like liquibase. The possibilities to repair from this state is:
- Run keycloak with system property
"-Dkeycloak.dblock.forceUnlock=true" . Then Keycloak will release
the existing lock at startup and acquire new lock. The warning is
written to server.log that this property should be used carefully
just to repair DB
- Manually delete lock record from DATABASECHANGELOGLOCK table (or
"dblock" collection in mongo)
The other possibility is that after timeout, node2 will assume the
current lock is timed-out and will forcefully release existing
lock and replace with it's own lock. However I didn't it this way
as it's potentially dangerous though - there is some chance that 2
nodes run migration or import at the same time and DB will end in
inconsistent state. Or is it acceptable risk?
Marek
On 07/03/16 19:50, Stian Thorgersen wrote:
900 seconds is probably ok, but what happens if the
node holding the lock dies?