dmvk commented on a change in pull request #17607:
URL: https://github.com/apache/flink/pull/17607#discussion_r743563968



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
##########
@@ -154,54 +158,75 @@ public ZooKeeperStateHandleStore(
             throws PossibleInconsistentStateException, Exception {
         checkNotNull(pathInZooKeeper, "Path in ZooKeeper");
         checkNotNull(state, "State");
-
         final String path = normalizePath(pathInZooKeeper);
+        try {
+            try {
+                // Obtain the write-lock.
+                
client.create().withMode(CreateMode.EPHEMERAL).forPath(getWriteLockPath(path));

Review comment:
       We can simply get rid of this write lock. It was meant just a safeguard, 
but it seems to introduce more corner cases. If we trust the leader election 
mechanism here, it's not needed. I'll remove it.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/zookeeper/ZooKeeperStateHandleStore.java
##########
@@ -154,54 +158,75 @@ public ZooKeeperStateHandleStore(
             throws PossibleInconsistentStateException, Exception {
         checkNotNull(pathInZooKeeper, "Path in ZooKeeper");
         checkNotNull(state, "State");
-
         final String path = normalizePath(pathInZooKeeper);
+        try {
+            try {
+                // Obtain the write-lock.
+                
client.create().withMode(CreateMode.EPHEMERAL).forPath(getWriteLockPath(path));

Review comment:
       We can simply get rid of this write lock. It was meant as a safeguard, 
but it seems to introduce more corner cases. If we trust the leader election 
mechanism here, it's not needed. I'll remove it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to