jiafu1115 commented on code in PR #20913:
URL: https://github.com/apache/kafka/pull/20913#discussion_r3194121961


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -399,6 +411,15 @@ public Boolean remoteLogCopyDisable() {
         return remoteLogConfig.remoteLogCopyDisable;
     }
 
+
+    public long remoteCopyLagMs() {
+        return remoteLogConfig.remoteCopyLagMs == MAX_REMOTE_COPY_LAG_MS ? 
localRetentionMs() : remoteLogConfig.remoteCopyLagMs;

Review Comment:
   @kamalcph  the Long.MaxValue is another magic number and  "the code can take 
max(0, min(copy_lag, local_retention))." is hidden logic which will confuse 
user for config setting. For example, he set one value but it don't work due to 
> local retention but he may think he can work due to the hidden logic.
   
   @chia7712 @showuon  Just cc you for more thought about this. using -1 or 
Long.MaxValue to reach the max delay lag? thanks



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