pvary commented on code in PR #14243:
URL: https://github.com/apache/iceberg/pull/14243#discussion_r2445203566


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/maintenance/api/ZkLockFactory.java:
##########
@@ -90,12 +114,18 @@ public void open() {
       return;
     }
 
+    if (retryPolicy == null) {
+      LOG.debug(
+          "RetryPolicy was null after deserialization. Recreating from enum: 
{}", zkRetryPolicy);
+      retryPolicy = createRetryPolicy(zkRetryPolicy);
+    }

Review Comment:
   This will effectively be always null. And called only once, since the open 
is called only once.
   
   I think the previous version was better, like:
   ```
       this.client =
           CuratorFrameworkFactory.builder()
               .connectString(connectString)
               .sessionTimeoutMs(sessionTimeoutMs)
               .connectionTimeoutMs(connectionTimeoutMs)
               .retryPolicy(new ExponentialBackoffRetry(baseSleepTimeMs, 
maxRetries))
               .retryPolicy(createPolicy())
               .build();
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to