From a5a4b35e39bf8b1d5c7435978570c57c6e7fd068 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sat, 3 Apr 2010 02:25:22 +0300 Subject: [PATCH] update firstMaster before submitting state update --- .../org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java index 6ddd1b3910b..051afacd3c2 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java @@ -145,6 +145,7 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent impl this.localNode = new Node(settings.get("name"), settings.getAsBoolean("node.data", true), channel.getAddress().toString(), transportService.boundAddress().publishAddress()); if (isMaster()) { + firstMaster = true; clusterService.submitStateUpdateTask("jgroups-disco-initialconnect(master)", new ProcessedClusterStateUpdateTask() { @Override public ClusterState execute(ClusterState currentState) { Nodes.Builder builder = new Nodes.Builder() @@ -159,7 +160,6 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent impl sendInitialStateEventIfNeeded(); } }); - firstMaster = true; addressSet = true; } else { clusterService.submitStateUpdateTask("jgroups-disco-initialconnect", new ClusterStateUpdateTask() {