ARTEMIS-1945 InVMNodeManager shared state should be volatile

State access should be atomic to be visibile between
different threads.
This commit is contained in:
Francesco Nigro 2018-06-19 18:21:03 +02:00 committed by Clebert Suconic
parent d125dcd067
commit e035487a5f
1 changed files with 2 additions and 4 deletions

View File

@ -49,7 +49,7 @@ public final class InVMNodeManager extends NodeManager {
LIVE, PAUSED, FAILING_BACK, NOT_STARTED
}
public State state = NOT_STARTED;
public volatile State state = NOT_STARTED;
public long failoverPause = 0L;
@ -147,9 +147,7 @@ public final class InVMNodeManager extends NodeManager {
@Override
public void releaseBackup() {
if (backupLock != null) {
backupLock.release();
}
backupLock.release();
}
@Override