ARTEMIS-1945 InVMNodeManager shared state should be volatile
State access should be atomic to be visibile between different threads.
This commit is contained in:
parent
d125dcd067
commit
e035487a5f
|
@ -49,7 +49,7 @@ public final class InVMNodeManager extends NodeManager {
|
||||||
LIVE, PAUSED, FAILING_BACK, NOT_STARTED
|
LIVE, PAUSED, FAILING_BACK, NOT_STARTED
|
||||||
}
|
}
|
||||||
|
|
||||||
public State state = NOT_STARTED;
|
public volatile State state = NOT_STARTED;
|
||||||
|
|
||||||
public long failoverPause = 0L;
|
public long failoverPause = 0L;
|
||||||
|
|
||||||
|
@ -147,9 +147,7 @@ public final class InVMNodeManager extends NodeManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void releaseBackup() {
|
public void releaseBackup() {
|
||||||
if (backupLock != null) {
|
backupLock.release();
|
||||||
backupLock.release();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue