Skip to content

Conversation

@AndrewJSchofield
Copy link
Member

@AndrewJSchofield AndrewJSchofield commented Dec 1, 2025

ShareFetch requests can be used to fetch records for share consumers,
but in some cases, no records are required and the request is just being
used to update the share session or send acknowledgements. As a result,
there are situations in which a ShareFetch request would be built, only
for it to be entirely empty (no fetch, no asks, no share session
update). This PR simplifies the logic for detecting when the request is
empty and then to avoid building it entirely. It also adds some tests
for this case.

Reviewers: Apoorv Mittal apoorvmittal10@gmail.com

Copy link
Contributor

@apoorvmittal10 apoorvmittal10 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, LGTM!

@AndrewJSchofield AndrewJSchofield merged commit 3e3f0c4 into apache:trunk Dec 3, 2025
25 checks passed
@AndrewJSchofield AndrewJSchofield deleted the KAFKA-19946 branch December 3, 2025 10:05
AndrewJSchofield added a commit that referenced this pull request Dec 3, 2025
ShareFetch requests can be used to fetch records for share consumers,
but in some cases, no records are required and the request is just being
used to update the share session or send acknowledgements. As a result,
there are situations in which a ShareFetch request would be built, only
for it to be entirely empty (no fetch, no asks, no share session
update). This PR simplifies the logic for detecting when the request is
empty and then to avoid building it entirely. It also adds some tests
for this case.

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>
@AndrewJSchofield
Copy link
Member Author

Cherry-picked to 4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants