[ISSUE #10949] Improve pop consumer offset committing - #10964
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #10964 +/- ##
=============================================
- Coverage 48.58% 48.54% -0.05%
- Complexity 13671 13672 +1
=============================================
Files 1381 1381
Lines 101475 101534 +59
Branches 13189 13198 +9
=============================================
- Hits 49302 49290 -12
- Misses 46176 46235 +59
- Partials 5997 6009 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
This PR improves the pop consumer offset committing mechanism by introducing a pending commit offset pattern that ensures offsets are committed only after pop operations complete, and adds lock acquisition in cleanupRecords to prevent concurrent eviction during pop writes.
The changes are well-structured and address a real concurrency issue. The use of volatile for pendingCommitOffset and CAS-based advancePendingCommitOffset ensures thread safety. The lock acquisition in cleanupRecords (matching the popAsync lock) correctly prevents race conditions.
LGTM — no blocking issues found.
Automated review by github-manager-bot
Which Issue(s) This PR Fixes
Brief Description
How Did You Test This Change?
Minimum verification test. Check whether the consumer offsets have been advanced.