Skip to content

Conversation

guyinyou
Copy link
Contributor

These two configurations are typically used together and need to be enabled/disabled simultaneously, so merging them simplifies configuration management.

Changes:

  • Remove enableRunningFlagsInFlush configuration field and its getter/setter methods
  • Update AllocateMappedFileService to use isWriteWithoutMmap for runningFlags logic
  • Update CommitLog to use isWriteWithoutMmap for runningFlags logic
  • Update writeWithoutMmap documentation to explain runningFlags behavior

Behavior after merge:

  • When isWriteWithoutMmap=true: Use RandomAccessFile + set runningFlags to null
  • When isWriteWithoutMmap=false: Use MappedByteBuffer + use normal runningFlags

This eliminates the need to manage two separate but related configurations, reducing the chance of misconfiguration and simplifying the codebase.

Change-Id: I053a6ee5c8ba9be825db47940900ce01a8c707b9

Which Issue(s) This PR Fixes

Fixes #9730

Brief Description

How Did You Test This Change?

These two configurations are typically used together and need to be enabled/disabled
simultaneously, so merging them simplifies configuration management.

Changes:
- Remove enableRunningFlagsInFlush configuration field and its getter/setter methods
- Update AllocateMappedFileService to use isWriteWithoutMmap for runningFlags logic
- Update CommitLog to use isWriteWithoutMmap for runningFlags logic
- Update writeWithoutMmap documentation to explain runningFlags behavior

Behavior after merge:
- When isWriteWithoutMmap=true: Use RandomAccessFile + set runningFlags to null
- When isWriteWithoutMmap=false: Use MappedByteBuffer + use normal runningFlags

This eliminates the need to manage two separate but related configurations,
reducing the chance of misconfiguration and simplifying the codebase.

Change-Id: I053a6ee5c8ba9be825db47940900ce01a8c707b9
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.13%. Comparing base (6d6921b) to head (06699c7).

Files with missing lines Patch % Lines
...ache/rocketmq/store/AllocateMappedFileService.java 0.00% 0 Missing and 1 partial ⚠️
...main/java/org/apache/rocketmq/store/CommitLog.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #9731   +/-   ##
==========================================
  Coverage      48.13%   48.13%           
- Complexity     12143    12147    +4     
==========================================
  Files           1313     1313           
  Lines          93339    93333    -6     
  Branches       11962    11962           
==========================================
+ Hits           44925    44927    +2     
+ Misses         42837    42820   -17     
- Partials        5577     5586    +9     

☔ 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.

@RongtongJin RongtongJin added ha and removed ha labels Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Merge enableRunningFlagsInFlush and isWriteWithoutMmap configurations
3 participants