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 6354174b authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1811 Handle the interrupted exception gracefully

When the lockmanager has an indication for 'abort' for the lock for the
thread that is executing the UpdateExecutor, it means, that the current
or a different cluster node has requested the task to be stopped. Invoking
#cancel is the graceful stop of the job
parent 16621623
......@@ -507,7 +507,12 @@ public class UpdaterExecutor implements EventListener {
private void throttle(long timeout) {
try {
Thread.sleep(timeout);
} catch (InterruptedException ignore) {}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// the LockManager most likely has picked up an 'abort' set for the lock of the current thread.
// #cancel will gracefully stop this UpdaterExecutor
cancel();
}
}
private boolean isVirtual(final Node node) throws RepositoryException {
......
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