code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit f038ec5b authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1811 Locks in status ABORT should also be refreshed

Namely if a lock is in status ABORT and the lock is for the *CLUSTER NODE*
on which the DbLockRefresher runs, then it means that on this cluster
node the Thread that should be aborted did not yet abort (for example
still busy with its job). All we can do is wait until that job finishes
parent 62bd68c2
......@@ -82,7 +82,7 @@ public class DbLockManager extends AbstractLockManager {
public static final String ABORT_STATEMENT = "UPDATE " + TABLE_NAME_LOCK + " SET status='ABORT' WHERE lockKey=?";
// only refreshes its own cluster locks
public static final String LOCKS_TO_REFRESH_BLOCKING_STATEMENT = "SELECT * FROM " + TABLE_NAME_LOCK + " WHERE lockOwner=? AND expirationTime<? AND status='RUNNING' FOR UPDATE";
public static final String LOCKS_TO_REFRESH_BLOCKING_STATEMENT = "SELECT * FROM " + TABLE_NAME_LOCK + " WHERE lockOwner=? AND expirationTime<? AND (status='RUNNING' OR status='ABORT') FOR UPDATE";
public static final String REFRESH_LOCK_STATEMENT = "UPDATE " + TABLE_NAME_LOCK + " SET expirationTime=? WHERE lockKey=?";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment