Repository navigation
Conversation
Backport only the Area ownership fix from upstream commit `17c161a31b47a22e71ca222839143f66717ac365` to `4.2-dev`. A rejected `growArea2` does not release the old allocation. Receive its result into a temporary slice and publish `v.area` only on success, preserving the owner for normal cleanup. No budget/admission policy, HashJoin cleanup mechanism, public API, MergeTop error classification, or compiler rewrite is changed. - Separate the retained Area slice (ownership/last-resort cleanup) from `bytes.Clone` snapshots (old bytes and logical row values). Assert row counts and appended values. Explicitly preserve the pre-existing `UnionOne` control's length-on-error behavior; this PR does not promise atomic append for that API. - Check production account/live-allocation and HashJoin budget usage before any test-only orphan reclamation. Zero-length/non-zero-capacity reused Areas retain ownership. - Widen the ordinary large-LIMIT fixture above the 23-byte inline threshold. It is explicitly success-path coverage, not evidence of budget-denial cleanup or an unbackported compiler rewrite. - Add `test/distributed/isolated/area_admission/hashjoin_area.sql/.result` and instructions. On a dedicated single-CN service with the public `processLimitationSize=8388608`, the same HashJoin query first sees 8,192 64-byte strings, then 8,192 2,048-byte strings. Check its physical HashJoin plan before adding the large batch (`EXPLAIN PHYPLAN` executes), reject the later growth, then check COUNT on the original connection and a new session. This configuration-specific fixture is deliberately outside the default BVT cases and must be run separately in QA. Base: `588295fdabe01fbee49f48107dff98dcc26b6178`. Reviewed head: `c7b726705276fca696afa3ce4e9a74f0eca94e77`. - Same final Vector/HashJoin targeted regressions, `-count=10`: original product hunk restored to base => FAIL (exit 1); repaired => PASS. Failure is real production cleanup residue, not test double-free. - Two complete packages with controlled `mo-cgo-test -v -count=1 -timeout=120s`: PASS. - Targeted `-race -count=10 -timeout=240s`: PASS. - `go list`, `go build`, `go vet` for both packages, formatting and `git diff --check`: PASS. - Official mo-tester comparison mode, isolated SQL, identical fixture/config (`autoReconnect=false`): unpatched => exit 1, 11/15 successful with one mismatch and three admission-related abnormal results; repaired => exit 0, 15/15. Red SQL records `used=524288`, `owner=1`, `site=103`, `live-allocations=1`, followed by suspended new-session admission. Green returns the ordinary budget error without an invariant suffix, and both COUNT queries return 16384. - Official mo-tester comparison mode, widened normal large-LIMIT case: exit 0, 19/19. - Exact-content semantic preflight: PASS. Product executables differ only by the Area ownership hunk (test/doc-only follow-up changes do not enter the service binary). The previous head's CI passed; that is not a claim about this new head's CI. Current-head CI and maintainer review remain independent gates. Ready for review is not merge approval. QA required: yes Reason: production memory ownership and admission recovery require deployment validation. Run the isolated 8 MiB regression separately, then verify actual deployed SHA and fresh-session admission before restarting the FULLTEXT2 campaign. Local tests do not prove shared-dev recovery or complete FULLTEXT2 acceptance. No shared dev objects were changed for this validation. Approved by: @XuPeng-SH (cherry picked from commit 027194e)
Preserve the zero-length and nonzero-capacity ownership checks without importing unsafe in the cherry-picked regression tests.
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? |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
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: eb8255ee7d085174d89c1ae21c8eb760d3435358
Assessment: approve
The fix preserves Area ownership when growth fails and follows existing grow/free conventions. Successful-copy behavior is unchanged. No actionable defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all eight changed files, three discussion entries, linked issue context and allocation/HashJoin cleanup consumers.
-
Accepted author-reported normal/race package results, final regressions and baseline/candidate SQL comparisons for this narrow ownership repair.
-
Static audit passed: patch identity, Go formatting, discussion coverage, fixture mappings and independent SQL-result arithmetic. Receipt checks/1793766158814184534-3.json matches static-audit.log.
Limitations:
-
No fresh local Go/race or SQL execution; raw author validation logs were unavailable.
-
Product CI results, deployed-image validation and customer-incident attribution remain unverified.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #27968. Cherry-picks the Area ownership fix from #28369 (
027194e3ac2a) to the 4.2.1 hotfix branch.What this PR does / why we need it:
When bulk appending variable-length Vector data, an allocation or budget rejection can return a nil Area while the previous Area is still allocated. Assigning that result directly to the Vector loses the only cleanup reference. HashJoin can then finish with a nonzero allocation account and suspend later account admission on the same CN.
Keep the existing Area until growth succeeds. The conflict was resolved in the 4.2.1 branch's existing
UnionBatchfast path; allocation policy, error classification, and successful copy behavior are unchanged. The original PR's tests and SQL fixtures are included. A test-only follow-up replaces unsafe pointer inspection with guarded slice access while retaining the zero-length/nonzero-capacity ownership check.Validation on the 4.2.1 base
d8286add2798, macOS arm64 and Go 1.26.4:checkunsafediagnostic inpkg/container/vector/functionTool_test.go.The reported customer incident has not yet been tied to this exact SQL path. GitHub CI and validation on the deployed image are pending.