Skip to content

MINOR: Refactored gap window names in share partition#20411

Merged
apoorvmittal10 merged 2 commits into
apache:trunkfrom
apoorvmittal10:KAFKA-19632-minor
Aug 27, 2025
Merged

MINOR: Refactored gap window names in share partition#20411
apoorvmittal10 merged 2 commits into
apache:trunkfrom
apoorvmittal10:KAFKA-19632-minor

Conversation

@apoorvmittal10

@apoorvmittal10 apoorvmittal10 commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

As per the suggestion by @adixitconfluent and @chirag-wadhwa5,
here,
I have refactored the code with variable and method names.

Reviewers: Andrew Schofield aschofield@confluent.io, Chirag Wadhwa
cwadhwa@confluent.io

@github-actions github-actions Bot added the triage PRs from the community label Aug 26, 2025
@github-actions github-actions Bot added core Kafka Broker KIP-932 Queues for Kafka labels Aug 26, 2025
@apoorvmittal10 apoorvmittal10 added ci-approved and removed triage PRs from the community labels Aug 26, 2025
@@ -1181,7 +1182,7 @@ public void testMaybeInitializeAndAcquire() {
assertEquals(RecordState.ACQUIRED, sharePartition.cachedState().get(26L).batchState());
assertEquals(30L, sharePartition.endOffset());
// As all the gaps are now filled, the initialReadGapOffset should be null.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// As all the gaps are now filled, the initialReadGapOffset should be null.
// As all the gaps are now filled, the persisterReadResultGapWindow should be null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -1279,7 +1280,7 @@ public void testMaybeInitializeAndAcquireWithHigherMaxFetchRecords() {
assertEquals(RecordState.ACQUIRED, sharePartition.cachedState().get(31L).batchState());
assertEquals(49L, sharePartition.endOffset());
// As all the gaps are now filled, the initialReadGapOffset should be null.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// As all the gaps are now filled, the initialReadGapOffset should be null.
// As all the gaps are now filled, the persisterReadResultGapWindow should be null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -1591,7 +1592,7 @@ public void testMaybeInitializeAndAcquireWithMultipleBatches() {
assertEquals(RecordState.ACQUIRED, sharePartition.cachedState().get(26L).batchState());
assertEquals(49L, sharePartition.endOffset());
// As all the gaps are now filled, the initialReadGapOffset should be null.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// As all the gaps are now filled, the initialReadGapOffset should be null.
// As all the gaps are now filled, the persisterReadResultGapWindow should be null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@chirag-wadhwa5

chirag-wadhwa5 commented Aug 26, 2025

Copy link
Copy Markdown
Collaborator

LGTM, just some minor comment changes suggested above.

@AndrewJSchofield AndrewJSchofield left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the refactor. This makes more sense with the new names. lgtm

@chirag-wadhwa5 chirag-wadhwa5 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apoorvmittal10
apoorvmittal10 merged commit c5d0ddd into apache:trunk Aug 27, 2025
33 of 36 checks passed
eduwercamacaro pushed a commit to littlehorse-enterprises/kafka that referenced this pull request Nov 12, 2025
As per the suggestion by @adixitconfluent and @chirag-wadhwa5,

[here](apache#20395 (comment)),
I have refactored the code with variable and method names.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Chirag Wadhwa
<cwadhwa@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker KIP-932 Queues for Kafka

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants