-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[ISSUE #4070] bugfix : Returning min queue offset when timestamp is larger than queue-unit max timestamp #4071
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
Merged
Conversation
This file contains hidden or 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
lizhiboo
reviewed
Mar 31, 2022
store/src/main/java/org/apache/rocketmq/store/queue/BatchConsumeQueue.java
Show resolved
Hide resolved
lizhiboo
approved these changes
Mar 31, 2022
Git-Yang
approved these changes
Mar 31, 2022
Codecov Report
@@ Coverage Diff @@
## 5.0.0-beta #4071 +/- ##
================================================
+ Coverage 43.09% 43.12% +0.02%
- Complexity 6014 6021 +7
================================================
Files 795 795
Lines 56825 56828 +3
Branches 7780 7781 +1
================================================
+ Hits 24491 24509 +18
+ Misses 29142 29124 -18
- Partials 3192 3195 +3
Continue to review full report at Codecov.
|
panzhi33
approved these changes
Mar 31, 2022
tianliuliu
approved these changes
Mar 31, 2022
@lizhiboo Hi, would you please check if this pr could be merged? |
caigy
approved these changes
Apr 19, 2022
lwclover
approved these changes
Apr 24, 2022
cserwen
approved these changes
May 6, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is the purpose of the change
#4070
Brief changelog
There's no need to binary search offset if the target timestamp is larger than the batchConsumeQueue's max timestamp. So if target timestamp is larger than max timestamp, return max offset directly.
Verifying this change
before:


We will get "-1" when we getOffsetInQueueByTime if the target timestamp is larger than the max queue unit timestamp.
The result as follows:
after :

After fix that:
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.