Repository navigation
fix(objectio): release idle write arenas on 4.2-dev - #32773
Conversation
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 is merged. |
|
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: edd11f9b50a0066729813eed69aa442fa5e9eee8
Assessment: approve
Per-arena expiry extends the existing pool coherently. Budget accounting, bounded checkout and writer ownership remain intact; generations isolate stale callbacks, and cleanup runs outside the pool lock. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Full pkg/objectio normal and race suites passed after source-matched native prerequisite recovery.
-
All four new timer/lifecycle tests passed with -race -count=100.
-
Five sinker/layout/cancellation tests and three admission/recovery tests passed under race.
-
go vet, changed-file gofmt and complete-delta whitespace checks passed.
-
All three discussion entries reconciled; source unchanged. validation-audit.json matches 11 receipts to retained evidence, including the initial missing-header diagnostic and successful recovery.
Limitations:
-
Author SQL/RSS and benchmark results were not independently reproduced; raw logs were unavailable. This assessment does not establish umbrella issue #32751 acceptance.
-
Hosted product checks and Go analysis remained pending in the frozen evidence snapshot.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32751
What this PR does / why we need it:
On 4.2-dev, a burst can leave writer arenas idle while sinker closes or checkpoints continually defer the global drain. The 4.2 shared pool budget limits retention but does not make surplus arenas age out while other work continues.
Expire each arena after one minute of inactivity, taking the most recently returned arena first so an active working set stays warm. Preserve the 4.2 per-tier count and byte limits, shared budget, bounded checkout, legacy global drain, and explicit memory-pressure release. Detach idle arenas under the pool lock and release them outside it; a timer generation check prevents stale callbacks from draining newly parked arenas.
On an isolated 1-CN CPU-only 57 test with one 8 MiB field and 31 64 KiB fields, both versions verified all row hashes after LOAD and ALTER. At 75 seconds the base still held a 32 MiB arena and 16 MiB compression buffer, plus 9.95 MiB pooled Go serialization capacity; the new pool no longer held them. On the new version the native allocator briefly cached the 48 MiB, then expired that cache after about one second; sampled CN RSS fell from 501.87 to 482.05 MiB during this transition. Go heap and filesystem caches have separate lifetimes, and allocated capacity is not the same as resident memory.
Trade-offs and validation:
This change targets idle retention; it does not bound active query memory or by itself resolve OOM while processing a very large row.