This is an automated email from the ASF dual-hosted git repository.
huijun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new f095cdb reorder (#2908)
f095cdb is described below
commit f095cdb85aaaf6cbdb58225df5973509441ac77c
Author: bed debug <[email protected]>
AuthorDate: Tue May 29 11:44:57 2018 -0700
reorder (#2908)
---
heron/common/src/cpp/zookeeper/zkclient.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/heron/common/src/cpp/zookeeper/zkclient.cpp
b/heron/common/src/cpp/zookeeper/zkclient.cpp
index c9750e4..f200d42 100644
--- a/heron/common/src/cpp/zookeeper/zkclient.cpp
+++ b/heron/common/src/cpp/zookeeper/zkclient.cpp
@@ -146,8 +146,12 @@ void ZKClient::Init() {
// Destructor.
ZKClient::~ZKClient() {
- delete piper_;
zookeeper_close(zk_handle_);
+ // zookeeper_close() depends on piper_
+ // when HeronZKStateMgr::GlobalWatchEventHandler() and GetCompletionWatcher
+ // are called at the same time in two threads,
+ // thus `delete piper_` after zookeeper_close() joins all zk_client threads.
+ delete piper_;
}
//
--
To stop receiving notification emails like this one, please contact
[email protected].