flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [FLINK-2604] [runtime] Adds synchronization to stop method of ZooKeeperLeaderElectionService
Date Wed, 02 Sep 2015 07:44:15 GMT
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 <trohrmann@apache.org>
Authored: Wed Sep 2 09:42:38 2015 +0200
Committer: Till Rohrmann <trohrmann@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


Mime
View raw message