You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Concurrent DUMP TABLE to the same Stage path can report success for the wrong source table #29759
Regression and extended verification for #29759 (2026-10-22)
Verification Environment
Latest fetched origin/main: 6495ce997486c2445994081c1d85c39802f7049b — fix: preserve view authorization across index joins and replacement (#30799).
Rebuilt and restarted the actual runtime from this commit (TYPECHECK=1, Linux/arm64). Binary version and git_version() on all endpoints confirmed 6495ce9974.
Full local topology: 2 CN / 1 TN / 1 Log service / Proxy, co-located in one service process/container with shared local archive storage; not a physical multi-host deployment.
Proxy 127.0.0.1:6001, CN1 127.0.0.1:16001, CN2 127.0.0.1:16002: all connected and actually executed DUMP TABLE / LOAD TABLE. Public SQL used PyMySQL COM_QUERY with independent connections; the existing integration test uses Go database/sql and the MySQL driver.
What Was Covered
OK — Original flushed source tables, each with 2,000 rows and distinct markers: sequential controls and 10 fresh-path CN1/CN2 races. Every race had exactly 1 successful publisher; manifest source, READY, and every restored (id, marker) matched that publisher.
OK — Additional Proxy/CN and Proxy/Proxy races, same-source competition, different-path concurrent success, published-path replacement rejection, and empty archives. Across public SQL scenarios, 183 successful restores were checked row-for-row through all 3 endpoints.
OK — Deterministic pre-manifest barriers for CN1/CN2, Proxy/CN1 and Proxy/CN2: observed both publishers blocked before release. Together with the original/extended races, 25 same-path competitions passed. Rejected writers returned 20406 (already exists) without changing the winning archive.
OK — Cancellation after manifest publication through each endpoint returned 1317; all 9 incomplete-archive LOAD TABLE attempts were rejected with READY marker is missing, leaving empty targets. Competing publication was rejected; same-connection retry to a fresh path and subsequent restores passed.
OK — Existing TestTableDumpConcurrentPublication passed normally and under -race: 1 measurement run plus 3 consecutive repetitions in one process, with no race report. Existing storage/provider/allocator regressions also passed (8 top-level component tests).
OK — Test databases and stages were removed, connections remained healthy, and injected fault points were removed with the original disabled state restored. Source checkout remained clean.
Not covered — Real S3/MinIO services, physical multi-host deployment, live TN process restart, mixed-version/external writers, or performance benchmarks. HTTP provider controls and allocator binding-loss component tests are not substitutes for those environments.
Findings
The original wrong-source success and double-success behavior did not reproduce. PR #29808, fix(frontend): publish DUMP archives with create-only storage writes, merged as 04fe057bd73520cdf30754f79f66f6505060ad1f and is included in the tested main. It makes manifest/READY publication storage-level create-only, preventing a losing publisher from replacing the winner's metadata. Cancellation leaves an incomplete archive that fails closed.
MOTR / BVT Coverage
Reused the existing deterministic SQL integration regression, including filesystem aliases, cancellation and retry, plus the existing storage and allocator tests. The permanent regression needs only 2 rows per source table.
No new MOTR coverage gap was identified, so no duplicate case, recording/replay, commit, push or weekly PR update was necessary. Actual concurrent server requests and publication barriers were verified; this is not a MOTR -j scheduling claim.
Final Conclusion
Fixed for the original concurrent same-path local Stage publication issue on the tested main.
Additional large-data regression is not required: this is publication ownership under concurrency, not a row-count, block/batch, memory or spill boundary. The original 2,000-row reproduction and deterministic minimal-data concurrency tests cover the relevant boundary; increasing data volume would not strengthen that assertion.
Activity
Ariznawlll commentedon Oct 9, 2026
补充定位:新一轮独立复现中,
left_src的 DUMP 返回成功,right_src报READY already exists;但归档的manifest.json中source_table=right_src,LOAD 后的 2000 行也都是右表标记 2。顺序对照中,对已发布路径二次 DUMP 会在manifest.json already exists处拒绝。因此失败点是并发发布时 manifest 与 READY 的所有权被拆开,不是 LOAD 误解码。Ariznawlll commentedon Oct 9, 2026
将并发复现扩展为 10 个互不复用的 Stage 子路径后,10/10 路径都至少有一条成功返回的 DUMP 与最终
manifest.source_table/LOAD 数据不一致;其中 4/10 路径的两条 DUMP 均返回成功。各路径创建前不存在,顺序对照仍正常。slyunnn commentedon Oct 22, 2026
Regression and extended verification for #29759 (2026-10-22)
Verification Environment
origin/main:6495ce997486c2445994081c1d85c39802f7049b—fix: preserve view authorization across index joins and replacement (#30799).TYPECHECK=1, Linux/arm64). Binary version andgit_version()on all endpoints confirmed6495ce9974.2 CN / 1 TN / 1 Log service / Proxy, co-located in one service process/container with shared local archive storage; not a physical multi-host deployment.127.0.0.1:6001, CN1127.0.0.1:16001, CN2127.0.0.1:16002: all connected and actually executedDUMP TABLE/LOAD TABLE. Public SQL used PyMySQLCOM_QUERYwith independent connections; the existing integration test uses Godatabase/sqland the MySQL driver.What Was Covered
2,000rows and distinct markers: sequential controls and10fresh-path CN1/CN2 races. Every race had exactly1successful publisher; manifest source,READY, and every restored(id, marker)matched that publisher.183successful restores were checked row-for-row through all3endpoints.25same-path competitions passed. Rejected writers returned20406(already exists) without changing the winning archive.1317; all9incomplete-archiveLOAD TABLEattempts were rejected withREADY marker is missing, leaving empty targets. Competing publication was rejected; same-connection retry to a fresh path and subsequent restores passed.TestTableDumpConcurrentPublicationpassed normally and under-race:1measurement run plus3consecutive repetitions in one process, with no race report. Existing storage/provider/allocator regressions also passed (8top-level component tests).Findings
The original wrong-source success and double-success behavior did not reproduce. PR #29808,
fix(frontend): publish DUMP archives with create-only storage writes, merged as04fe057bd73520cdf30754f79f66f6505060ad1fand is included in the tested main. It makes manifest/READYpublication storage-level create-only, preventing a losing publisher from replacing the winner's metadata. Cancellation leaves an incomplete archive that fails closed.MOTR / BVT Coverage
Reused the existing deterministic SQL integration regression, including filesystem aliases, cancellation and retry, plus the existing storage and allocator tests. The permanent regression needs only
2rows per source table.No new MOTR coverage gap was identified, so no duplicate case, recording/replay, commit, push or weekly PR update was necessary. Actual concurrent server requests and publication barriers were verified; this is not a MOTR
-jscheduling claim.Final Conclusion
Fixedfor the original concurrent same-path local Stage publication issue on the tested main.Additional large-data regression is not required: this is publication ownership under concurrency, not a row-count, block/batch, memory or spill boundary. The original
2,000-row reproduction and deterministic minimal-data concurrency tests cover the relevant boundary; increasing data volume would not strengthen that assertion.