-
Notifications
You must be signed in to change notification settings - Fork 161
[ISSUE #739]🔥Improve the pull message consumption pattern🚀 #740
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
Conversation
WalkthroughThis update to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
🚀Thanks for your contribution🎉. CodeRabbit(AI) will review your code first🔥 |
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
rocketmq-store/src/message_store/default_message_store.rs (1)
980-983
: Consider removing the commented-outprintln!
statement.If the
println!
statement is no longer needed, consider removing it entirely to keep the code clean.- /* println!( - "------------------------------------------------{} {} {} {} {}", - result, next_begin_offset, max_offset, min_offset, elapsed_time - );*/
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (6)
- rocketmq-store/src/base/get_message_result.rs (2 hunks)
- rocketmq-store/src/config/message_store_config.rs (1 hunks)
- rocketmq-store/src/log_file.rs (1 hunks)
- rocketmq-store/src/log_file/cold_data_check_service.rs (1 hunks)
- rocketmq-store/src/log_file/commit_log.rs (4 hunks)
- rocketmq-store/src/message_store/default_message_store.rs (2 hunks)
Additional comments not posted (8)
rocketmq-store/src/log_file.rs (1)
33-33
: LGTM!The addition of the
cold_data_check_service
module looks good.rocketmq-store/src/base/get_message_result.rs (1)
54-69
: LGTM!The implementation of the
fmt::Display
trait for theGetMessageResult
struct is clear and covers all relevant fields.rocketmq-store/src/config/message_store_config.rs (1)
289-289
: LGTM!The update to the
access_message_in_memory_max_ratio
field value from0
to40
looks good.rocketmq-store/src/message_store/default_message_store.rs (1)
835-839
: Logging changes look good!The use of the
warn!
macro for logging consumer request topics, offsets, and corrections tonextBeginOffset
is appropriate and provides valuable information for debugging and monitoring.rocketmq-store/src/log_file/commit_log.rs (4)
66-66
: Import Approved:ColdDataCheckService
The import of
ColdDataCheckService
from thecold_data_check_service
module is necessary for the new functionality.
200-200
: Field Addition Approved:cold_data_check_service
The addition of the
cold_data_check_service
field to theCommitLog
struct is approved. This field is necessary for the new functionality related to checking data in the page cache.
238-238
: Initialization Approved:cold_data_check_service
The initialization of the
cold_data_check_service
field in theCommitLog::new
method withArc::new(Default::default())
is correct and ensures proper setup.
269-284
: Enhancement Approved: Page Cache Check inget_message
The changes in the
get_message
method to usecold_data_check_service
for checking if data is in the page cache and settingis_in_cache
forSelectMappedBufferResult
is a valuable enhancement for performance monitoring.
#[derive(Default)] | ||
pub struct ColdDataCheckService; | ||
|
||
impl ColdDataCheckService { | ||
pub fn is_data_in_page_cache(&self) -> bool { | ||
true | ||
} |
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.
Consider implementing actual logic for is_data_in_page_cache
.
The method is_data_in_page_cache
currently always returns true
, which might be a placeholder. Ensure that the actual logic for checking data in the page cache is implemented.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
==========================================
- Coverage 27.89% 27.83% -0.06%
==========================================
Files 269 270 +1
Lines 21360 21380 +20
==========================================
- Hits 5958 5952 -6
- Misses 15402 15428 +26 ☔ View full report in Codecov by Sentry. |
Which Issue(s) This PR Fixes(Closes)
Fixes #739
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
New Features
ColdDataCheckService
for enhanced data verification.CommitLog
for cold data checks.Improvements
DefaultMessageStore
for better debugging and traceability.Configuration Changes
access_message_in_memory_max_ratio
inMessageStoreConfig
from0
to40
.Code Formatting
GetMessageResult
.