-
Notifications
You must be signed in to change notification settings - Fork 111
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 #2323]🐛Fix PopMessageProcessor build SubscriptionData error🧑💻 #2324
Conversation
WalkthroughThe pull request enhances error handling and logging within the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
🔊@mxsm 🚀Thanks for your contribution🎉! 💡CodeRabbit(AI) will review your code first🔥! Note 🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥. |
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: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rocketmq-broker/src/processor/pop_message_processor.rs
(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: CI
rocketmq-broker/src/processor/pop_message_processor.rs
[error] 298-298: Option doesn't implement std::fmt::Display trait. Use {:?} or {:#?} format specifier instead.
[error] 331-331: Option doesn't implement std::fmt::Display trait. Use {:?} or {:#?} format specifier instead.
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: build (macos-latest, stable)
- GitHub Check: test
- GitHub Check: build
- GitHub Check: auto-approve
🔇 Additional comments (1)
rocketmq-broker/src/processor/pop_message_processor.rs (1)
384-385
: LGTM! Good default subscription handling.The code correctly handles the default case by using
SUB_ALL
constant andTAG
expression type when no specific subscription is provided.
warn!( | ||
"Parse the consumer's subscription[{}] error, group: {}", | ||
request_header.exp, request_header.consumer_group | ||
); |
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.
Fix the warning log format specifier for Option type.
The warning log is trying to format an Option<CheetahString>
without the debug format specifier. This causes a compilation error as Option<T>
doesn't implement the Display
trait.
Apply this diff to fix the formatting:
- "Parse the consumer's subscription[{}] error, group: {}",
- request_header.exp, request_header.consumer_group
+ "Parse the consumer's subscription[{:?}] error, group: {}",
+ request_header.exp, request_header.consumer_group
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
warn!( | |
"Parse the consumer's subscription[{}] error, group: {}", | |
request_header.exp, request_header.consumer_group | |
); | |
warn!( | |
"Parse the consumer's subscription[{:?}] error, group: {}", | |
request_header.exp, request_header.consumer_group | |
); |
🧰 Tools
🪛 GitHub Actions: CI
[error] 298-298: Option doesn't implement std::fmt::Display trait. Use {:?} or {:#?} format specifier instead.
warn!( | ||
"Parse the consumer's subscription[{}] error, group: {}", | ||
request_header.exp, request_header.consumer_group | ||
); |
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.
Fix the warning log format specifier for Option type.
The warning log has the same formatting issue as the previous one, attempting to format an Option<CheetahString>
without the debug format specifier.
Apply this diff to fix the formatting:
- "Parse the consumer's subscription[{}] error, group: {}",
- request_header.exp, request_header.consumer_group
+ "Parse the consumer's subscription[{:?}] error, group: {}",
+ request_header.exp, request_header.consumer_group
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
warn!( | |
"Parse the consumer's subscription[{}] error, group: {}", | |
request_header.exp, request_header.consumer_group | |
); | |
warn!( | |
"Parse the consumer's subscription[{:?}] error, group: {}", | |
request_header.exp, request_header.consumer_group | |
); |
🧰 Tools
🪛 GitHub Actions: CI
[error] 331-331: Option doesn't implement std::fmt::Display trait. Use {:?} or {:#?} format specifier instead.
🔊@mxsm 🚀Thanks for your contribution🎉! 💡CodeRabbit(AI) will review your code first🔥! Note 🚨The code review suggestions from CodeRabbit are to be used as a reference only, and the PR submitter can decide whether to make changes based on their own judgment. Ultimately, the project management personnel will conduct the final code review💥. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2324 +/- ##
==========================================
- Coverage 28.29% 28.29% -0.01%
==========================================
Files 504 504
Lines 72401 72405 +4
==========================================
Hits 20485 20485
- Misses 51916 51920 +4 ☔ View full report in Codecov by Sentry. |
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
Which Issue(s) This PR Fixes(Closes)
Fixes #2323
Brief Description
How Did You Test This Change?
Summary by CodeRabbit
Bug Fixes
Chores