You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "sumanpal97 (via GitHub)" <gi...@apache.org> on 2026/08/11 06:07:32 UTC

[PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

sumanpal97 opened a new pull request, #23126:
URL: https://github.com/apache/kafka/pull/23126

   ## Summary
   - Make the `openIterators` comparator total by tie-breaking on a per-iterator sequence id, so iterators opened in the same millisecond are tracked uniquely in metered store wrappers.
   - Add regression tests covering same-ms iterators (close older first, close younger first) and different iterator types sharing one `openIterators` set.
   
   Fixes [KAFKA-20902](https://issues.apache.org/jira/browse/KAFKA-20902).
   
   ## Test plan
   - [x] `./gradlew :streams:build` (compile, checkstyle, all streams unit tests)
   - [x] New regression tests fail without the fix and pass with it:
     - `MeteredKeyValueStoreTest.shouldTrackOldestOpenIteratorWhenTwoOpenedInSameMillisecond`
     - `MeteredKeyValueStoreTest.shouldTrackOldestOpenIteratorWhenYoungerIteratorInSameMillisecondIsClosedFirst`
     - `MeteredWindowStoreTest.shouldTrackOldestOpenIteratorWhenDifferentIteratorTypesOpenedInSameMillisecond`


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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5770749730

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "sumanpal97 (via GitHub)" <gi...@apache.org>.
sumanpal97 commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5488737557

   Hi @mimaison , can you please help with the approval or tagging the right focal for this change review.


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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5612144623

   A label of 'needs-attention' was automatically added to this PR in order to raise the
   attention of the committers. Once this issue has been triaged, the `triage` label
   should be removed to prevent this automation from happening again.


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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "sumanpal97 (via GitHub)" <gi...@apache.org>.
sumanpal97 commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5343913250

   Hi @Jess668, can you also please take a look on this changes.


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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "sumanpal97 (via GitHub)" <gi...@apache.org>.
sumanpal97 commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5295099312

   Hi @aliehsaeedii — this PR addresses the `openIterators` same-millisecond collision you flagged during review of #22975 (KAFKA-20902).
   
   **What changed:**
   - Tie-break the `openIterators` comparator with a per-iterator sequence id so iterators opened in the same millisecond are tracked uniquely.
   - Added regression tests for same-ms open/close ordering and mixed iterator types.
   
   **Verification:**
   - `./gradlew :streams:build` passes
   - New tests fail without the fix and pass with it
   
   Would you be able to take a look when you have time? Happy to adjust if you'd prefer a different tie-break approach. 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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] KAFKA-20902: Fix oldest-iterator-open-since-ms for same-ms iterators [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on PR #23126:
URL: https://github.com/apache/kafka/pull/23126#issuecomment-5662461232

   > Hi @mimaison , can you please help with the approval or tagging the right focal for this change review.
   
   cc @mjsax


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