Skip to content

[ISSUE #5329]✨Remove useless code from broker_bootstrap.rs#5331

Merged
mxsm merged 2 commits intomxsm:mainfrom
leonprietobailo:enh/remove-dead-code-broker_boostrap.rs-5329
Jan 2, 2026
Merged

[ISSUE #5329]✨Remove useless code from broker_bootstrap.rs#5331
mxsm merged 2 commits intomxsm:mainfrom
leonprietobailo:enh/remove-dead-code-broker_boostrap.rs-5329

Conversation

@leonprietobailo
Copy link
Copy Markdown
Contributor

@leonprietobailo leonprietobailo commented Jan 1, 2026

Which Issue(s) This PR Fixes(Closes)

Fixes #5329

Brief Description

Removed unused code.

How Did You Test This Change?

N/A

Summary by CodeRabbit

  • Refactor
    • Simplified broker startup by streamlining configuration handling during initialization.
    • Removed an obsolete configuration setter from the public builder API, reducing the exposed surface and potential misuse.
    • Result: fewer upfront configuration steps required to initialize the broker runtime, making setup more straightforward and dependable for operators.

✏️ Tip: You can customize this high-level summary in your review settings.

@rocketmq-rust-bot rocketmq-rust-bot self-requested a review January 1, 2026 18:25
@rocketmq-rust-bot
Copy link
Copy Markdown
Collaborator

🔊@leonprietobailo 🚀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💥.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 1, 2026

Walkthrough

Removed the unused server_config field and its set_server_config setter from the Builder in broker_bootstrap.rs. Updated Builder::new and BrokerBootstrap::build to stop initializing/passing server_config, removing it from BrokerRuntime construction.

Changes

Cohort / File(s) Summary
Builder struct cleanup
rocketmq-broker/src/broker_bootstrap.rs
Removed server_config: ServerConfig field and pub fn set_server_config(...) method; eliminated initialization of server_config in Builder::new; updated BrokerBootstrap::build to construct BrokerRuntime without server_config (now only broker_config and message_store_config wrapped in Arc).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 I nudged a field into the night,
Removed a setter out of sight,
Builder hops lighter on the way,
Cleaner code to greet the day,
Tiny change, a tidy delight.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: removing useless code from broker_bootstrap.rs, which aligns with the changeset.
Linked Issues check ✅ Passed The PR removes unused server_config field and set_server_config method from the Builder struct, directly addressing the stated objective in issue #5329.
Out of Scope Changes check ✅ Passed All changes are scoped to removing dead code from broker_bootstrap.rs as specified in issue #5329; no unrelated modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f16915 and d3a37c9.

📒 Files selected for processing (1)
  • rocketmq-broker/src/broker_bootstrap.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • rocketmq-broker/src/broker_bootstrap.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Build & Test (windows-latest)
  • GitHub Check: Build & Test (ubuntu-latest)
  • GitHub Check: Build & Test (macos-latest)
  • GitHub Check: Code Coverage
  • GitHub Check: auto-approve

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Owner

@mxsm mxsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonprietobailo Please fix ci error

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.19%. Comparing base (3555b22) to head (d3a37c9).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5331      +/-   ##
==========================================
+ Coverage   37.13%   37.19%   +0.06%     
==========================================
  Files         798      800       +2     
  Lines      107788   108037     +249     
==========================================
+ Hits        40022    40182     +160     
- Misses      67766    67855      +89     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@rocketmq-rust-bot rocketmq-rust-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - All CI checks passed ✅

Copy link
Copy Markdown
Owner

@mxsm mxsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mxsm mxsm merged commit 564ec23 into mxsm:main Jan 2, 2026
10 of 13 checks passed
@rocketmq-rust-bot rocketmq-rust-bot added approved PR has approved and removed ready to review waiting-review waiting review this PR labels Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement✨] Remove useless code from broker_bootstrap.rs

4 participants