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/13 00:32:40 UTC

[GitHub] [kafka] mjsax commented on pull request #10953: MINOR: Default GRACE with Old API should set as 24H minus window-size / inactivity-gap

mjsax commented on pull request #10953:
URL: https://github.com/apache/kafka/pull/10953#issuecomment-878687476


   Correct, sliding-windows were added later and never had a default grace. Also, we deprecated `until() / maintainMs()` before and because sliding-windows do not inherit from `Windows<W>` is never added `until() / maintainMs()` -- thus, I don't think we need to update them. Note that there is an interplay between grace period and retention time in the old API.
   
   However, looking into the code of the different classes, it seems only `TimeWindow` needs to be updated, because it implements:
   ```
   public long maintainMs() {
       return Math.max(maintainDurationMs, sizeMs + gracePeriodMs());
   }
   ```
   
   In contrast, `JoinWindows` used `Math.max(maintainDurationMs, size());` and `SessionWindows` used `Math.max(maintainDurationMs, gapMs);` -- thus, there retention-time should not be affected by any change to grace-period?
   
   


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