I have code to run liquibase during server startup.
I am running against ORACLE db.
I have an issue where the first instance is starting fine. The other is blocked on SELECT FOR UPDATE.
I've found this code in SelectFromDatabaseChangeLogLockGenerator
:
if (database instanceof OracleDatabase) {
sql += " FOR UPDATE";
}
For some reason (why?) the first server is holding a lock on the talbe hence the other server instance is stuck on startup.
- why does
listLocks
api inLockService
do a FOR UPDATE select? - any ideas how to bypass this?
Note: I need to check for locks upon startup so I call list locks programmatically.