-
Notifications
You must be signed in to change notification settings - Fork 472
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(stream): make consumer decrement pending number when message is acknowledged. #2352
Merged
mapleFU
merged 5 commits into
apache:unstable
from
LindaSummer:bugfix/consumer_xack_pending
Jun 3, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e04ee84
make consumer decrement pending number when message is acknowledged.
LindaSummer 1e03f65
update map int entity construction to auto construction, it will be `…
LindaSummer 777f504
add error handling and fix sonar issue
LindaSummer f020a4c
add error handling for `rocksdb::Get`
LindaSummer b481810
Merge branch 'unstable' into bugfix/consumer_xack_pending
PragmaTwice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if
!s.ok() && !s.IsNotFound()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very for your correction.
It should be an internal error and I think that I need to return the error. This function's return type is a
rocksdb::Status
so I don't need to wrap it to another format.Do I need to add golang integration test for this error handling case? This may be hard to produce a case for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it's a bit hard to modify this, especially in integration tests. We can just handle this without testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! I have corrected my wording above.
This function returns
rocksdb::Status
and I think I should return the status immediately in the function when!s.ok() && !s.IsNotFound()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're two gets here, right?
if (s.ok())
in the loop should also adds this checks(Though errors merely happens)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your correction!
Sorry for missing another error handling. I have added it with a new commit.