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
|
||||
}
|
||||
|
||||
public State state = NOT_STARTED;
|
||||
public volatile State state = NOT_STARTED;
|
||||
|
||||
public long failoverPause = 0L;
|
||||
|
||||
|
@ -147,10 +147,8 @@ public final class InVMNodeManager extends NodeManager {
|
|||
|
||||
@Override
|
||||
public void releaseBackup() {
|
||||
if (backupLock != null) {
|
||||
backupLock.release();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException {
|
||||
|
|
Loading…
Reference in New Issue