storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/3] storm git commit: STORM-1941 Nimbus discovery can fail when zookeeper reconnect happens.
Date Tue, 05 Jul 2016 08:31:30 GMT
Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch 8d80c622b -> c45ea218d


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/1b98be3e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1b98be3e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1b98be3e

Branch: refs/heads/1.0.x-branch
Commit: 1b98be3e5a2a658a2ef508594baca152ee940d1f
Parents: 8d80c62
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Fri Jul 1 23:54:15 2016 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Tue Jul 5 17:20:23 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/1b98be3e/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