Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: commit topic partitions end offsets #194

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IpShot
Copy link

@IpShot IpShot commented Nov 1, 2024

Set topic partitions offsets to the end of logs.

Issue: #193

Copy link
Contributor

@ttypic ttypic left a comment

Choose a reason for hiding this comment

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

Hi @IpShot,

Thank you very much for reporting the issue and providing a solution! However, I believe the fix might be applied in the wrong place. The getMaximumOffset method correctly calculates the maximum offset. The issue seems to occur in the preCommit method, where we specify the offsets to commit.

The actual problem is that the offsets we commit are for the messages we want to read next, rather than the offsets of the messages we have already read. I suggest moving the +1 logic to the updateOffsets method, which is invoked in preCommit.

Thanks again for your help

@IpShot IpShot force-pushed the fix/commit-topic-partitions-end-offsets branch from f0744de to 5e25a8f Compare November 18, 2024 08:39
@IpShot
Copy link
Author

IpShot commented Nov 18, 2024

Hi @IpShot,

Thank you very much for reporting the issue and providing a solution! However, I believe the fix might be applied in the wrong place. The getMaximumOffset method correctly calculates the maximum offset. The issue seems to occur in the preCommit method, where we specify the offsets to commit.

The actual problem is that the offsets we commit are for the messages we want to read next, rather than the offsets of the messages we have already read. I suggest moving the +1 logic to the updateOffsets method, which is invoked in preCommit.

Thanks again for your help

Thanks for the review. Agree with your point, updated.

@IpShot IpShot requested a review from ttypic November 18, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants