Skip to content

[ISSUE #9726] Abstract StoreMetricsManager interface to support non-DefaultMessageStore implementations#9727

Merged
ltamber merged 1 commit intoapache:developfrom
RongtongJin:dev-0923
Sep 24, 2025
Merged

[ISSUE #9726] Abstract StoreMetricsManager interface to support non-DefaultMessageStore implementations#9727
ltamber merged 1 commit intoapache:developfrom
RongtongJin:dev-0923

Conversation

@RongtongJin
Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #9726

Brief Description

  • Create StoreMetricsManager interface to define unified metrics management methods
  • Add getStoreMetricsManager() method to MessageStore interface
  • Add flushBehindBytes() method to MessageStore interface (fixes missing method calls)
  • Refactor DefaultStoreMetricsManager to implement StoreMetricsManager interface
  • Update all MessageStore implementations to support the new interface
  • Modify TimerMessageStore to use getStoreMetricsManager() instead of direct type checking

How Did You Test This Change?

…ltMessageStore

- Create StoreMetricsManager interface to define unified metrics management methods
- Add getStoreMetricsManager() method to MessageStore interface
- Add flushBehindBytes() method to MessageStore interface to fix missing method calls
- Refactor DefaultStoreMetricsManager to implement StoreMetricsManager interface
- Update all MessageStore implementations to support the new interface
- Modify TimerMessageStore to use getStoreMetricsManager() instead of direct type checking

This refactoring resolves the issue where incTimerDequeueCount and incTimerEnqueueCount
methods cannot be called when messageStore is not a DefaultMessageStore, improving
code extensibility and decoupling.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.16%. Comparing base (a4da5f5) to head (d56bd5e).
⚠️ Report is 171 commits behind head on develop.

Files with missing lines Patch % Lines
...ketmq/store/plugin/AbstractPluginMessageStore.java 0.00% 2 Missing ⚠️
...apache/rocketmq/store/timer/TimerMessageStore.java 81.81% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9727      +/-   ##
=============================================
- Coverage      48.21%   48.16%   -0.06%     
+ Complexity     12166    12158       -8     
=============================================
  Files           1313     1313              
  Lines          93335    93339       +4     
  Branches       11962    11962              
=============================================
- Hits           45005    44960      -45     
- Misses         42762    42801      +39     
- Partials        5568     5578      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ltamber ltamber merged commit d197028 into apache:develop Sep 24, 2025
13 of 14 checks passed
@RongtongJin RongtongJin added the ha label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Abstract StoreMetricsManager interface to support non-DefaultMessageStore implementations

4 participants