Skip to content

fix(vector): preserve const-null clone backing ownership - #31704

Merged
XuPeng-SH merged 5 commits into
mainfrom
codex/fix-31690-main-vector-leaks
Oct 29, 2026
Merged

XuPeng-SH merged 5 commits into
mainfrom
codex/fix-31690-main-vector-leaks

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Fixes #31690

What this PR does / why we need it:

Forward-port the remaining constant-NULL clone ownership fix from #31693. Keep owned data capacity as a zero-length slice for reuse and eventual release. Release a borrowed data lease through its existing reference-counted owner, or detach a legacy alias, while preserving independent area ownership and existing runtime metadata handling.

The transaction-vector errors from #31690 already have cleanup in this main base, so no transaction changes are included. Tests cover retained capacity/accounting, nil-mpool and legacy aliases, serialization and metadata reset, data-only and shared data/area lease release, pool reuse, and allocation-limit eviction.

Validation: focused regressions and full normal/race tests for pkg/container/vector and pkg/vm/engine/tae/containers; incremental gofmt, go vet, repository-pinned molint and golangci-lint. Native prerequisites rebuilt from this base; tests use Go 1.27.1 and TZ=UTC. CI is pending.

@XuPeng-SH
XuPeng-SH requested a review from aunjgr as a code owner October 29, 2026 07:00
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · superseded

Commit: 7af93e7485c72e1a5a9f6f50ee891f38c0a181df

"interrupted"

@XuPeng-SH

XuPeng-SH commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: e94df1bbb6f5594e315cde0eb5abe80d5ff7ce3b

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: e94df1bbb6f5594e315cde0eb5abe80d5ff7ce3b

Assessment: approve

The fix preserves owned capacity and accounting, releases borrowed data correctly, and retains independent area ownership. Reset, serialization, pool reuse, and eviction paths are covered. No actionable findings remain.

Model: gpt-6-astra / xhigh

Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2

Validation:

  • All six new regression tests passed.

  • Both affected packages passed normal and race tests with no skips.

  • Six lifecycle regressions and the concurrent lease control each passed 100 race repetitions.

  • Changed-file gofmt and both-package go vet passed.

  • Isolation preflight passed; native inputs and artifact hashes were verified. Source remained unchanged.

  • attempt-4/validation-ledger.json maps command/source/exit receipts to retained logs; discussion-assessment.json covers all three discussion entries.

Limitations:

  • Relevant CI remained pending in the supplied snapshot; approval relies on completed local checks and source review.

  • The initial test invocation failed from reviewer linker-flag quoting; the corrected invocation passed. Both logs are retained.

  • Related PR #31693 content was not supplied; linked issue #31690 and current transaction cleanup were reviewed.

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/enhancement size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: off-heap vector buffers leak on v4.2.1 clone and transaction error paths

2 participants