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


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -138,6 +144,10 @@ public Optional<String> serverConfigName(String 
configName) {
     public static final boolean DEFAULT_REMOTE_LOG_DELETE_ON_DISABLE_CONFIG = 
false;
     public static final long DEFAULT_LOCAL_RETENTION_BYTES = -2; // It 
indicates the value to be derived from RetentionBytes
     public static final long DEFAULT_LOCAL_RETENTION_MS = -2; // It indicates 
the value to be derived from RetentionMs
+    public static final long DEFAULT_REMOTE_COPY_LAG_MS = -2;  // It indicates 
no delay check based on local retention ms
+    public static final long DEFAULT_REMOTE_COPY_LAG_BYTES = -2; // It 
indicates no delay check based on local retention bytes

Review Comment:
   @kamalcph Thanks for your discussion.
   
   Maybe I didn’t explain the need for -2 very well, because I treated the 
conclusion as the reason. Let me try to explain it from a user scenario:
   
   Suppose a user has a topic that only sets a **time**-based retention policy 
(e.g., 7 days). How should we set the delay lag in this case?
   
   You may set the time lag to 1 day. But how should you set **the size lag**? 
Actually, in this case, you don’t want to configure it at all. You should leave 
it as a default value.
   
   If the default value is 0, the upload will be triggered immediately no 
matter care about the time setting. So the default value should be a value less 
than 0. That’s why I set it to -2, which means this configuration item is not 
checked.



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