Repository navigation
fix: promote group_concat truncation on strict writes - #28705
Conversation
Promote GROUP_CONCAT warning 1260 to a statement error before strict write materialization commits, while preserving SELECT, non-strict, and INSERT IGNORE behavior.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
…arding Require the GROUP_CONCAT warning collector on every strict-write attempt, including retries without a frontend warning sink. Transfer the truncation marker atomically with the attempt's bounded diagnostics and forward it independently of retained diagnostic rows. Bound marker messages at their common insertion point, discard failed generations, and avoid counting forwarded markers as additional warnings. Cover sinkless retry, nested diagnostic retention, and late callbacks; inspect INSERT IGNORE warnings before a subsequent SELECT replaces the diagnostics.
|
@XuPeng-SH Fixed in 618a48f, including newest main. Strict AP writes now require reporting-capable selected workers and fall back locally for older main/release workers. Internal SQL inherits that requirement, and the actual send destination is checked again. This placement rule is conservative for strict writes so hidden/internal aggregation cannot bypass it; SELECT, IGNORE, and non-strict policy remain unchanged. The final safeguard does not infer “no cut” from missing diagnostics. New terminal envelopes explicitly acknowledge reporting completeness; an old, empty, malformed, or missing terminal leaves reporting incomplete. That state propagates monotonically through forwarding workers and successful nested attempts, is sealed with the attempt, and is discarded on retry/failure. A stream that never attempted work needs no report. Strict completion fails before workspace/result-sink success if evidence is incomplete, even if placement or capability information became stale. Tests cover the exact65-warning/64-retained-record old envelope with no1260 record, rejection through Compile.Run, missing/empty/malformed terminals, forwarding, late callbacks, retry isolation, and no-work streams. A real two-CN test verifies INSERT and CTAS rollback against an older-worker topology while INSERT IGNORE still stores the truncated value. The strict-write SQL BVT passes twice (38/38 statements per run), with cleanup verified. Full compile race tests, owning-package tests, and full SCA pass. Local changed-code coverage is81.89% with the unchanged CI parser. Fresh CI is running; ready for re-review. |
Use the existing file-sync hook in the bounded async-update memory test so its flush barrier measures queue completion rather than host durability latency. Preserve admission, retained-byte, drop-count, and final release assertions. Register the blocked path release immediately and defer mutex unlocks so assertion failures cannot deadlock fixture cleanup.
|
Fixed the failing CI test in 3cca92a, with newest main merged.
The test also registers its held-path release immediately and defers mutex unlocks, so an assertion failure cannot prevent fixture cleanup. No retry, skip, or timeout increase was added. Validation: focused normal test, 100 race-detector iterations, full fileservice tests, compile tests after the main merge, and full repository SCA passed. Fresh CI will validate the pushed head. |
Apply the simulated legacy-worker protocol and forced multi-CN scan setting only while executing the INSERT, CTAS, and INSERT IGNORE statements under test. Restore both settings before checking rollback state and before fixture cleanup, so information_schema subscription discovery is not forced through an unrelated distributed metadata path. Preserve error 1260, empty destination, absent CTAS table, and warning-only IGNORE result assertions.
|
Fixed the new UT failure in b707070, with newest main merged. The failed statement was the CTAS rollback oracle querying The legacy-worker version and forced-scan overrides now belong to a scoped execution helper used by all three target writes: strict INSERT, CTAS (including its internal SQL), and INSERT IGNORE. Both overrides restore before result/rollback verification and fixture cleanup. All original assertions remain: error 1260 for strict writes, no committed destination rows, no CTAS table, and Validation passed: focused two-CN SQL regression; race-detector run plus two same-process repetitions; full DML package; full repository SCA (0 issues). The new head has been pushed for fresh CI. |
Retain main's version-67 timezone codec and worker/destination fences alongside this PR's own capability checks. Require version68 for the new capability and exercise version67 fallback, destination downgrade, and receiver rejection where applicable. Preserve both sides of the test and planner merges.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 7f2701ac3db05e1ff12147ebb5582912b5cc177e. Strict-write GROUP_CONCAT truncation is promoted before affected-row publication, workspace adjustment and sink success; warning facts survive bounded diagnostic retention without double-counting, failed retries discard them, successful children forward them, and sealed collectors reject late callbacks. UPDATE IGNORE and old-worker reporting paths are covered; protocol 68 follows base protocol 67. Exact-head CI run 34810748334 passed. The new strict reporting UT took 2.17s in the race CI log; no material racing-UT cost blocker found.
Merge Queue Status
This pull request spent 7 minutes 24 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #28664
What this PR does / why we need it:
GROUP_CONCAT reported truncation warning 1260 but strict INSERT-SELECT and CTAS could still persist the truncated value. The same materialization rule must apply to UPDATE, REPLACE, and ON DUPLICATE KEY UPDATE, while SELECT, non-strict writes, and INSERT IGNORE retain warning behavior.
Track GROUP_CONCAT truncation as a bounded statement-attempt fact independent of retained diagnostic rows. Carry that fact through child attempts and remote terminal messages, and promote it to error 1260 after pipeline completion but before a strict write succeeds. The existing transaction error path rolls back the write.
Create the required collector on every retry, including execution without a frontend warning sink. Seal and transfer diagnostics and the truncation fact together; failed attempts discard them and late callbacks cannot modify a replacement attempt. Marker forwarding does not increment the diagnostic count.
Cover strict-write rollback, CTAS table absence, SELECT/IGNORE/non-strict controls, retries without a warning sink, diagnostic-retention overflow, nested forwarding, and late callbacks. Read SHOW WARNINGS immediately after the statement that produced it.
Respect UPDATE IGNORE as well as INSERT IGNORE: truncated GROUP_CONCAT values remain successful warning-only writes under strict SQL modes. Verify warning 1260 and the updated value alongside the ordinary strict UPDATE rollback control.
Require complete truncation reporting from distributed strict-write workers. Keep strict AP writes and inherited internal SQL local when selected main/release workers lack MORPC capability 68, and recheck the actual destination before sending. Carry an explicit completeness acknowledgement in terminal diagnostics and propagate incompleteness through forwarding workers and nested attempts. Missing, malformed, empty, or retention-limited old reports cannot be interpreted as proof that no truncation occurred; reject successful write completion before commit when reporting is incomplete. Streams that never attempted remote work require no terminal report. IGNORE and non-strict writes retain warning-only behavior.