Skip to content

fix: isolate bundled multi-CN spill directories - #30814

Merged
XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-30086-spill-isolation-20261022
Dec 1, 2026
Merged

XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
VioletQwQ-0:codex/issue-30086-spill-isolation-20261022

Conversation

@VioletQwQ-0

@VioletQwQ-0 VioletQwQ-0 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • BUG

Which issue(s) this PR fixes:

issue #30086

What this PR does / why we need it:

The bundled multi-CN -launch examples assigned both SQL CNs the same LOCAL fileservice directory. Service startup clears LOCAL/__spill, so starting or restarting one CN could delete a JOIN spill file that its peer still needed to reopen.

  • Give each SQL CN a stable LOCAL root across the static, proxy, dynamic-CN, and legacy v1 -launch examples. DISK-V2 uses local2-cnN and DISK uses local-cnN to keep their on-disk formats separate.
  • Preserve SHARED roots, CN UUIDs, port bases, frontend ports, UNIX sockets, and fileservice backends.
  • Cover eight launch variants, peer spill reopen after startup cleanup and restart, and same-UUID metadata isolation when switching between legacy and default configurations in either direction.

Stop an existing topology before adopting the new launch configurations. Existing files stay in their original LOCAL directories. The Docker Compose topology generated by make dev-up uses a separate configuration path and remains outside this change.

Validation:

  • On exact head 4b295bca37a770abd5d9bf63b10f11ec6772bfd4 on macOS arm64, go test -p 6 -count=1 ./cmd/mo-service, go test -race -p 6 -count=1 ./cmd/mo-service, go vet -p 5 ./cmd/mo-service, and git diff --check passed.
  • The full cmd/mo-service package also passed after a test merge with main at 89cb66148d1c53ee2e4686b8cc8af52c7e7b7fca.
  • The new metadata regression failed against the previous PR configurations in both directions and passed after separating the roots. Independent review passed on the exact head. Its subprocess probe verified peer spill reopen and stale-file cleanup for both storage formats and both ownership directions, and reproduced peer-file loss against the target baseline.
  • Local multi-process SQL validation on earlier revision 6f961e7fb89da4c39c7dbe7e09b480f59727802a observed 2,800,000 spilled rows on both CNs. Peer startup and restart preserved live spill files and the exact JOIN result, COUNT(*)=800000 and SUM(...)=960001200000. The same binary with the old bundled configuration reproduced the missing spill file and failed JOIN.
  • BVT: N/A for the startup/restart boundary. test/distributed/cases/join/spill.sql supplies the SQL spill workload but cannot start or restart a peer process while that workload has live spill files. The FileService regression and the subprocess probe exercise that lifecycle separately.

QA required: yes

Exact-head CI and independent deployed multi-process SQL acceptance are pending. Deployment acceptance should observe a real spilling JOIN and assert its exact result through peer start and restart in both directions. Keep issue #30086 open for that acceptance.

@mergify

mergify Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

🚫 Left the queue · pull request dequeued

13 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Tue 1 Dec, 09:07 · rule main · triggered by @VioletQwQ-0 with the merge queue checkbox
  • ⏹️ Testing stopped · in place
  • 🚫 Left the queue 09:20 · 715f008

Reason

Pull request #30814 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

To get back in the queue

  • Push a change if one is needed: the pull request is queued again once its queue conditions match.
  • If no change is needed, tick the box below to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub branch protection:
    • check-neutral = CI Required
    • check-skipped = CI Required
    • check-success = CI Required

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request
2 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection

Times in UTC · dashboard · how the merge queue works

@XuPeng-SH

XuPeng-SH commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 4b295bca37a770abd5d9bf63b10f11ec6772bfd4

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mo-bot review · mo-bot-local · review

Commit: 4b295bca37a770abd5d9bf63b10f11ec6772bfd4

Assessment: approve

The bundled multi-CN configurations now give each CN a separate LOCAL root while preserving the shared storage roots and other settings. This reuses the existing spill cleanup path and addresses the reported peer-file deletion without adding a runtime ownership mechanism. No actionable findings remain.

Model: gpt-6.1-terra / max

Session: 01a22b78-8d27-7672-ac2d-c513f3728009 · slot 3 · generation 10

Validation:

  • An independent TOML and template probe parsed all eight topology pairs, checked distinct CN roots and dynamic formatting values, and compared non-LOCAL settings with the merge-base. Receipt 1796115848435522307-4.json matches launch-probe.log.

  • git diff --check passed; receipt 1796115934627043991-3.json matches diff-check.log.

  • The frozen exact-head CI snapshot reports successful Ubuntu UT, coverage, and CI Required checks. The PR also reports exact-head package and subprocess validation.

Limitations:

  • The focused Go tests did not run locally: the installed Go 1.26.6 is older than the required Go 1.27.1, and a bounded toolchain download timed out. Preflight passed; these setup outcomes are not test results.

  • The reported multi-process SQL spill reproduction used an earlier revision. Independent deployed SQL acceptance on the exact head remains pending.

@mergify mergify Bot added the queued label Dec 1, 2026

This branch was successfully deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants