Repository navigation
fix(vector): return append rollback failures on 4.2-dev - #32186
Conversation
Backport the safety semantics of 940d0f7: reject invalid checkpoint bounds and row-range overflow with a terminal error before mutation, propagate rollback failures through retained-batch append, and preserve the original allocation error after successful rollback. Keep the 2 GiB allocator ceiling and existing join storage unchanged. Adapt to the release branch without importing main-only metadata, Parquet or expression changes.
…llback-errors-4.2
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: a0823720a7e8af8f168f62da1a71d29bb4057316
Assessment: approve
The narrow rollback fix reuses existing invariant classification, preserves valid rollback behavior and cleanup ownership, and adds no state. The integration-test fence preserves denial assertions. No actionable defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Local source audit passed: frozen head, clean checkout, expected four-file scope, git diff --check and gofmt. source-audit.log matches checks/1793816501821552049-2.json, exit 0.
-
Reviewed both rollback consumers, terminal cleanup, spill classification and existing prefix, bitmap, reuse and accounting tests.
-
Supplied author evidence reports passing full vector/colexec suites, static checks and TestIssue29399AuthorizationScopeAndRevokedRole on Go 1.26.4.
-
Frozen current-head CI records 12 successes, 13 skipped checks and 2 neutral checks, including successful UT, static analysis, coverage and multi-CN BVT.
Limitations:
- Go/native and embedded-cluster tests were not rerun locally. Supplied CI and author results were reused; raw test logs are not embedded.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32143. Backport of #32167 to
4.2-dev; this handles allocation-error cleanup, not oversized allocation support.What this PR does / why we need it:
An allocation refusal must remain a returned query error. On
4.2-dev, an invalid append checkpoint currently panics during cleanup and can replace the original allocation error.Make
Vector.RollbackAppendreturn a terminal allocation-invariant error instead of panicking. Validate checkpoint bounds, negative attempted-row counts and row-range overflow before changing vector length, area, bitmaps or sorted state. Retain owned capacity for eventualFree.Propagate rollback failures through both retained join-batch append paths. Continue restoring the other affected columns after one rollback fails, and do not publish a restored batch row count unless every column was restored. Preserve the original error object when rollback succeeds; retain both causes when it fails so an invariant violation is not classified as retryable memory pressure.
Adapt the fix to the release branch's checkpoint layout and callers without importing main-only metadata or Parquet changes. Keep allocator ceilings, join row addressing and memory budgets unchanged.
Validation
pkg/container/vectorandpkg/sql/colexecsuites passed.make static-checkpassed with the release-pinned tools on Go 1.26.4; golangci-lint reported 0 issues.CI verification
The revoked-role integration test now fences the revocation committed on CN0 before checking denial on CN1, using the existing fixture commit-publication helper. All text/binary prepared and DDL denial assertions remain intact; no sleep, retry or timeout increase.
TestIssue29399AuthorizationScopeAndRevokedRole(15.151s).4.2-devmerged; no main-branch merge.