You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2015/09/02 09:44:15 UTC

flink git commit: [FLINK-2604] [runtime] Adds synchronization to stop method of ZooKeeperLeaderElectionService

Repository: flink
Updated Branches:
  refs/heads/master 6a58aadec -> 31aededec


[FLINK-2604] [runtime] Adds synchronization to stop method of ZooKeeperLeaderElectionService


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/31aedede
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/31aedede
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/31aedede

Branch: refs/heads/master
Commit: 31aededecfc4ec2085c00f23e2a78f660995efaa
Parents: 6a58aad
Author: Till Rohrmann <tr...@apache.org>
Authored: Wed Sep 2 09:42:38 2015 +0200
Committer: Till Rohrmann <tr...@apache.org>
Committed: Wed Sep 2 09:42:38 2015 +0200

----------------------------------------------------------------------
 .../runtime/leaderelection/ZooKeeperLeaderElectionService.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/31aedede/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
index d1fd548..709d031 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/leaderelection/ZooKeeperLeaderElectionService.java
@@ -114,8 +114,10 @@ public class ZooKeeperLeaderElectionService implements LeaderElectionService, Le
 		leaderLatch.close();
 		client.close();
 
-		confirmedLeaderSessionID = null;
-		issuedLeaderSessionID = null;
+		synchronized (lock) {
+			confirmedLeaderSessionID = null;
+			issuedLeaderSessionID = null;
+		}
 	}
 
 	@Override