Skip to content

[ISSUE #9178]🐛Fix macOS mapped-file retirement build - #9179

Merged
mxsm merged 1 commit into
mainfrom
mxsm/issue-9178-fix-macos-retirement-backend
Aug 10, 2026
Merged

[ISSUE #9178]🐛Fix macOS mapped-file retirement build#9179
mxsm merged 1 commit into
mainfrom
mxsm/issue-9178-fix-macos-retirement-backend

Conversation

@mxsm

@mxsm mxsm commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Which Issue(s) This PR Fixes(Closes)

Brief Description

Add the missing NamespaceRoot::open_active_segment implementation to the unsupported mapped-file retirement backend used on macOS and other non-Linux/non-Windows targets. The method preserves the existing safe behavior by returning NamespaceVerificationError::Unsupported.

Add a supported-host compile-time function-signature contract for the unsupported backend so regular test and Clippy builds detect future backend interface drift.

How Did You Test This Change?

  • cargo fmt --all -- --check: passed.
  • cargo check -p rocketmq-store-local --tests --all-features: passed.
  • cargo clippy --workspace --no-deps --all-targets --all-features -- -D warnings: passed.
  • cargo +nightly-2026-07-05 check --locked --all-targets --all-features from fuzz/: passed.
  • git diff --check: passed.
  • A local x86_64-apple-darwin cross-check was attempted from Linux but could not compile native C dependencies because a macOS C cross-compiler was unavailable; the pull request CI provides the native macOS build verification.

Summary by CodeRabbit

  • Bug Fixes

    • Improved behavior on unsupported platforms by returning a clear verification error when attempting to open active storage segments.
    • Prevented unsupported storage operations from being treated as successful.
  • Tests

    • Added validation to ensure unsupported-platform behavior remains consistent and follows the expected operation contract.

@rocketmq-rust-bot

Copy link
Copy Markdown
Collaborator

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

@rocketmq-rust-robot rocketmq-rust-robot added the bug🐛 Something isn't working label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d21bec76-305a-4e92-ba28-3f25516251a6

📥 Commits

Reviewing files that changed from the base of the PR and between c51347e and 0ce566f.

📒 Files selected for processing (2)
  • rocketmq-store-local/src/mapped_file/retirement/platform.rs
  • rocketmq-store-local/src/mapped_file/retirement/platform/unsupported.rs

Walkthrough

The unsupported mapped-file retirement backend now implements NamespaceRoot::open_active_segment. Supported-target tests include the backend and verify the method signature at compile time.

Changes

Mapped-file retirement backend

Layer / File(s) Summary
Unsupported backend contract
rocketmq-store-local/src/mapped_file/retirement/platform.rs, rocketmq-store-local/src/mapped_file/retirement/platform/unsupported.rs
The unsupported backend adds open_active_segment and returns NamespaceVerificationError::Unsupported. Test builds include the backend and verify its function signature at compile time.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: rocketmq-rust-bot, spacexcn, teslarustor

Poem

A rabbit checks the backend bright,
An unsupported path returns just right.
The signature stands, the tests agree,
Mac builds hop along with glee.
>🐇<

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mxsm/issue-9178-fix-macos-retirement-backend

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.

@mxsm
mxsm merged commit 269fc56 into main Aug 10, 2026
25 of 31 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 Aug 10, 2026
@mxsm
mxsm deleted the mxsm/issue-9178-fix-macos-retirement-backend branch August 15, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI review first Ai review pr first approved PR has approved auto merge bug🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug🐛] Fix macOS build for mapped-file retirement backend

3 participants