update firstMaster before submitting state update
This commit is contained in:
parent
65acc0cfa9
commit
a5a4b35e39
|
@ -145,6 +145,7 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent<Discovery> impl
|
||||||
this.localNode = new Node(settings.get("name"), settings.getAsBoolean("node.data", true), channel.getAddress().toString(), transportService.boundAddress().publishAddress());
|
this.localNode = new Node(settings.get("name"), settings.getAsBoolean("node.data", true), channel.getAddress().toString(), transportService.boundAddress().publishAddress());
|
||||||
|
|
||||||
if (isMaster()) {
|
if (isMaster()) {
|
||||||
|
firstMaster = true;
|
||||||
clusterService.submitStateUpdateTask("jgroups-disco-initialconnect(master)", new ProcessedClusterStateUpdateTask() {
|
clusterService.submitStateUpdateTask("jgroups-disco-initialconnect(master)", new ProcessedClusterStateUpdateTask() {
|
||||||
@Override public ClusterState execute(ClusterState currentState) {
|
@Override public ClusterState execute(ClusterState currentState) {
|
||||||
Nodes.Builder builder = new Nodes.Builder()
|
Nodes.Builder builder = new Nodes.Builder()
|
||||||
|
@ -159,7 +160,6 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent<Discovery> impl
|
||||||
sendInitialStateEventIfNeeded();
|
sendInitialStateEventIfNeeded();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
firstMaster = true;
|
|
||||||
addressSet = true;
|
addressSet = true;
|
||||||
} else {
|
} else {
|
||||||
clusterService.submitStateUpdateTask("jgroups-disco-initialconnect", new ClusterStateUpdateTask() {
|
clusterService.submitStateUpdateTask("jgroups-disco-initialconnect", new ClusterStateUpdateTask() {
|
||||||
|
|
Loading…
Reference in New Issue