[ISSUE #9215]🐛Release Broker store lease after healthy shutdown - #9217
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughThe broker runtime now detaches its message-store owner only after healthy shutdown. Tests verify owner release before same-path restart, controller failover, and broker rejoin. ChangesBroker store shutdown lifecycle
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
🔊@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💥. |
Which Issue(s) This PR Fixes(Closes)
Brief Description
Release the Broker runtime's final message-store owner after a completed durable shutdown so
StoreRootLeaseInnerdrops before an immediate same-path restart. Failed and timed-out shutdowns retain the owner for a safe retry instead of releasing a potentially active store.The restart regressions now assert the ownership boundary directly. Controller failover/rejoin tests use an explicit test-only shutdown deadline and require a healthy message-store report before reusing the old store root, which keeps the check deterministic on loaded CI runners without changing the production deadline.
How Did You Test This Change?
cargo test -p rocketmq-broker --lib --all-features(790 passed,0 failed,2 ignored)cargo test -p rocketmq-broker --lib broker_shutdown_cancels_scheduled_store_lease_before_store_lock_release -- --nocapturecargo test -p rocketmq-broker --lib three_controller_two_broker_controller_mode_failover -- --nocapturecargo fmt -p rocketmq-broker -- --checkcargo clippy --workspace --no-deps --all-targets --all-features -- -D warnings.\scripts\runtime-audit.ps1 -SkipBaseline -EnforceBoundaryBaselinecargo +nightly-2026-07-05 check --locked --all-targets --all-featuresfromfuzz/git diff --checkSummary by CodeRabbit
Bug Fixes
Tests