You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/17 01:46:22 UTC

[GitHub] [kafka] tang7526 commented on a change in pull request #11062: KAFKA-13094: Session windows do not consider user-specified grace when computing retention time for changelog

tang7526 commented on a change in pull request #11062:
URL: https://github.com/apache/kafka/pull/11062#discussion_r671589951



##########
File path: streams/src/main/java/org/apache/kafka/streams/kstream/SessionWindows.java
##########
@@ -187,7 +187,8 @@ public long inactivityGap() {
      */
     @Deprecated
     public long maintainMs() {
-        return Math.max(maintainDurationMs, gapMs);
+        final long gracePeriodMs = graceMs != -1 ? graceMs : Math.max(maintainDurationMs, gapMs) - inactivityGap();

Review comment:
       @guozhangwang  Thank you for your guidance.
   So I should change it to the following code. Is this correct?
   ```
       public long maintainMs() {
           return Math.max(maintainDurationMs, gapMs + graceMs);
       }
   ```




-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org