zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject zookeeper git commit: ZOOKEEPER-2726 ZOOKEEPER-2693: Patch for introduces potential race condition
Date Thu, 16 Mar 2017 19:58:33 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/branch-3.4 3e5000f5f -> 902bee641


ZOOKEEPER-2726 ZOOKEEPER-2693: Patch for introduces potential race condition

#196

Author: Kyle Nusbaum <knusbaum@yahoo-inc.com>

Reviewers: Govind Menon, Kishor Patil <patik523@yahoo.com>, Michael Han <hanm@apache.org>

Closes #197 from knusbaum/ZOOKEEPER-2726-3.4


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/902bee64
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/902bee64
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/902bee64

Branch: refs/heads/branch-3.4
Commit: 902bee6410a565aef59ab6b9834fa9e1ead3a742
Parents: 3e5000f
Author: Kyle Nusbaum <knusbaum@yahoo-inc.com>
Authored: Thu Mar 16 12:58:29 2017 -0700
Committer: Michael Han <hanm@apache.org>
Committed: Thu Mar 16 12:58:29 2017 -0700

----------------------------------------------------------------------
 src/java/main/org/apache/zookeeper/server/ServerCnxn.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/902bee64/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/server/ServerCnxn.java b/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
index 6b93e93..b554df9 100644
--- a/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
+++ b/src/java/main/org/apache/zookeeper/server/ServerCnxn.java
@@ -245,7 +245,7 @@ public abstract class ServerCnxn implements Stats, Watcher {
     private static boolean whiteListInitialized = false;
 
     // @VisibleForTesting
-    public static void resetWhiteList() {
+    public synchronized static void resetWhiteList() {
         whiteListInitialized = false;
         whiteListedCommands.clear();
     }
@@ -278,7 +278,7 @@ public abstract class ServerCnxn implements Stats, Watcher {
      * @param command The command string.
      * @return true if the specified command is enabled.
      */
-    public static boolean isEnabled(String command) {
+    public synchronized static boolean isEnabled(String command) {
         if (whiteListInitialized) {
             return whiteListedCommands.contains(command);
         }


Mime
View raw message