storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srihar...@apache.org
Subject [1/3] storm git commit: STORM-1941 Nimbus discovery can fail when zookeeper reconnect happens.
Date Mon, 04 Jul 2016 23:11:35 GMT
Repository: storm
Updated Branches:
  refs/heads/1.x-branch ef0f1b64f -> 1e0e32cc6


STORM-1941 Nimbus discovery can fail when zookeeper reconnect happens.

* delete ephemeral node first when reconnected handler is called


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/44ffed3e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/44ffed3e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/44ffed3e

Branch: refs/heads/1.x-branch
Commit: 44ffed3e846597100e8f1c9914811ac1d9907e17
Parents: af0c2a3
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Fri Jul 1 23:54:15 2016 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Fri Jul 1 23:54:15 2016 +0900

----------------------------------------------------------------------
 storm-core/src/clj/org/apache/storm/cluster.clj | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/44ffed3e/storm-core/src/clj/org/apache/storm/cluster.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/cluster.clj b/storm-core/src/clj/org/apache/storm/cluster.clj
index f76d682..914fa5b 100644
--- a/storm-core/src/clj/org/apache/storm/cluster.clj
+++ b/storm-core/src/clj/org/apache/storm/cluster.clj
@@ -334,6 +334,8 @@
                           (if (.equals newState ConnectionState/RECONNECTED)
                             (do
                               (log-message "Connection state has changed to reconnected so
setting nimbuses entry one more time")
+                              ;explicit delete for ephmeral node to ensure this session creates
the entry.
+                              (.delete_node cluster-state (nimbus-path nimbus-id))
                               (.set_ephemeral_node cluster-state (nimbus-path nimbus-id)
(Utils/serialize nimbus-summary) acls))))))
         
         (.set_ephemeral_node cluster-state (nimbus-path nimbus-id) (Utils/serialize nimbus-summary)
acls))


Mime
View raw message