-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
[ISSUE #6570] Fix the issue that expectLogicOffset is greater than currentLogicOffset in consumeQueue build when the message is illegal #6641
[ISSUE #6570] Fix the issue that expectLogicOffset is greater than currentLogicOffset in consumeQueue build when the message is illegal #6641
Conversation
…et in consumeQueue build when the message is illegal
# Conflicts: # store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreCleanFilesTest.java
Codecov Report
@@ Coverage Diff @@
## develop #6641 +/- ##
=============================================
- Coverage 43.13% 43.10% -0.04%
+ Complexity 9005 8994 -11
=============================================
Files 1107 1107
Lines 78297 78332 +35
Branches 10204 10212 +8
=============================================
- Hits 33776 33765 -11
- Misses 40302 40329 +27
- Partials 4219 4238 +19
... and 22 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
store/src/main/java/org/apache/rocketmq/store/queue/QueueOffsetOperator.java
Show resolved
Hide resolved
store/src/main/java/org/apache/rocketmq/store/ConsumeQueue.java
Outdated
Show resolved
Hide resolved
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.
LGTM
Long queueOffset = ConcurrentHashMapUtils.computeIfAbsent(this.topicQueueTable, topicQueueKey, k -> 0L); | ||
this.topicQueueTable.put(topicQueueKey, queueOffset + messageNum); | ||
return queueOffset; | ||
topicQueueTable.put(topicQueueKey, queueOffset + messageNum); | ||
} | ||
|
||
public void updateQueueOffset(String topicQueueKey, long offset) { | ||
this.topicQueueTable.put(topicQueueKey, offset); | ||
} |
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.
updateQueueOffset seems not be used.
Make sure set the target branch to
develop
What is the purpose of the change
fix #6570
Brief changelog
Fix the issue that expectLogicOffset is greater than currentLogicOffset in consumeQueue build
Verifying this change
XXXX
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.