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 2019/11/04 23:04:35 UTC

[GitHub] [helix] i3wangyi commented on a change in pull request #534: Implementation of create/get methods with custom serializer support

i3wangyi commented on a change in pull request #534: Implementation of create/get methods with custom serializer support
URL: https://github.com/apache/helix/pull/534#discussion_r342314636
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
 ##########
 @@ -101,6 +104,54 @@ public boolean create(String path, T record, int options) {
     return result._retCode == RetCode.OK;
   }
 
+  public AccessResult retryUntilCreated(String path, Object record, int options, final ZkSerializer zkSerializer) {
+    AccessResult result = new AccessResult();
+    CreateMode mode = AccessOption.getMode(options);
+    if (mode == null) {
+      LOG.error("Invalid create mode. options: " + options);
+      result._retCode = RetCode.ERROR;
+      return result;
+    }
+
+    boolean retry;
+    do {
+      retry = false;
+      try {
+        _zkClient.create(path, record, ZooDefs.Ids.OPEN_ACL_UNSAFE, mode, zkSerializer);
 
 Review comment:
   The latest change has covered the usage of a dummy serializer zkClient, please help take a look and there're details I believe needs to be adjusted.

----------------------------------------------------------------
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