Skip to content

[Bug]: Starting CN2 in bundled multi-CN setup deletes CN1 live JOIN spill files #30086

Open

Description

@Ariznawlll

Environment

  • MatrixOne main commit: 175a645a85994f2c95992d3aa8d6dacb6d9e167f.
  • Local two-CN launch based on the repository's etc/launch-multi-cn/launch.toml; CN1 and CN2 use the shipped cn1.toml and cn2.toml LOCAL file-service settings. In both files, [[fileservice]] name = "LOCAL" has data-dir = "mo-data/local2".
  • CN1 and CN2 are separate mo-service processes. This report is about the bundled local multi-CN configuration; it does not claim that deployments with isolated per-CN LOCAL directories have the same problem.

What happens

Starting CN2 while CN1 is processing a JOIN that has spilled to disk removes CN1's live spill files. CN1's query fails with ERROR 1105 (HY000): open .../mo-data/local2/__spill/probe_sub_<id>_10: no such file or directory (the missing file may be probe_<id>_<bucket> in another run).

This is not a result-comparison or SQL compatibility issue: a service lifecycle action in the provided multi-CN launch configuration invalidates another live CN's execution state.

Reproduction

  1. Launch the provided two-CN setup, with CN1 serving SQL and CN2 stopped. Create jl(c1 INT NOT NULL, c2 INT NOT NULL) CLUSTER BY(c1) and jr with the same schema. Populate jl with 1,000,000 rows and jr with 800,000 matching rows. To select the shuffle-join spill path, patch table_stats row counts to 5,000,000 and 4,000,000 as in test/distributed/cases/join/spill.sql.
  2. On CN1, run SET join_spill_mem=1000; SELECT COUNT(*), SUM(jl.c2+jr.c2) FROM jl JOIN jr ON jl.c1=jr.c1;. EXPLAIN ANALYZE for this fixture confirms shuffle: range(jl.c1), SpillRows=2800000, and SpillSize=52.17 MiB.
  3. While that query is running and CN1 has files under mo-data/local2/__spill, start CN2 with the shipped etc/launch-multi-cn/cn2.toml.

The CN1 query failed with the missing-spill-file error in 3/3 runs. Before starting CN2, the same query completed with COUNT(*)=800000 and SUM(...)=3200079200000. The failed query did not alter its input: afterward, the table counts and JOIN result were unchanged.

Control

Changing only CN2's LOCAL data-dir to mo-data/local3, then restarting CN2 at the same point in CN1's spilling JOIN, left the CN1 query running and returned the expected 800000 / 3200079200000. The provided cn2.toml value was restored after this control.

Code path / likely cause

Expected: starting/restarting CN2 must not remove CN1's live spill files. The bundled configurations should give each CN an isolated LOCAL path, or startup cleanup should be scoped to files owned by that CN.

Related but distinct: #27917 concerned shared transaction-trace storage in the local multi-CN launch. This report is about spill-file deletion during an active query.

Suggested regression placement: a multi-process integration/chaos test that observes a real SpillRows > 0 JOIN on CN1, restarts CN2, and asserts CN1 still returns the exact result. A single-process SQL case cannot exercise the destructive startup interaction.

Activity

  1. added this to the MO-202610 milestone on Oct 13, 2026
  2. added
    kind/bug
    on Oct 13, 2026
  3. added theissue type on Oct 13, 2026
  4. added
    severity/s1
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s1

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions