You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/01/03 08:23:30 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #642: Fix handleNewSession creating ephemeral node with expired session

pkuwm commented on a change in pull request #642: Fix handleNewSession creating ephemeral node with expired session
URL: https://github.com/apache/helix/pull/642#discussion_r361217790
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/manager/zk/zookeeper/ZkClient.java
 ##########
 @@ -556,15 +644,55 @@ public String create(final String path, Object datat, final List<ACL> acl, final
     }
     long startT = System.currentTimeMillis();
     try {
-      final byte[] data = datat == null ? null : serialize(datat, path);
-      checkDataSizeLimit(data);
-      String actualPath = retryUntilConnected(new Callable<String>() {
-        @Override
-        public String call() throws Exception {
-          return getConnection().create(path, data, acl, mode);
+      final byte[] dataBytes = dataObject == null ? null : serialize(dataObject, path);
+      checkDataSizeLimit(dataBytes);
+
+      /*
+       * We pass different implementation of callable.
+       * 1. If the session id is null, it means the operation is NOT session aware.
+       * In this case, we will implement a regular callable to create a node.
+       * 2. Otherwise, the operation is session aware. We will use a  to
 
 Review comment:
   Good catch. After the session aware operation class was removed, I forgot to change the comment.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org