treedb: pool append-only key arena chunks - #3569
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Clean sequential coordinator gate for #3558 / #3569: Artifact root: Throughput was not a blocker in this noisy run:
Total allocation-profile size also moved in a favorable direction:
However, the specific issue gate does not pass. Direct pprof focus on So I am leaving this PR draft / gate-blocked for now rather than promoting or merging it. The next useful action is either to revise the benchmark/issue target if the earlier full-suite attribution was sampling/order-sensitive, or revise this branch against a command shape that reproduces and materially reduces |
Objective
Pool append-only key arena chunks so copied non-inline keys do not repeatedly allocate fresh arena backing across append-only memtable reset/reuse cycles.
Refs #3558.
Scope
Includes:
TreeDB/internal/memtable/append_only.gokey-arena pool internals, lifecycle, stats.TreeDB/internal/memtable/append_only_pool_test.gokey-arena pool/lifecycle/cap tests.TreeDB/cachingstats/drop wiring and tests so the pool is observable and discarded during pressure/cold append-only transitions.Excludes:
Design
make([]byte, chunkCap)insideappendOnlyKeyArena.alloc, so profile attribution still shows real fresh allocation misses in the target function.ReleaseDropEntries/ResetDropEntriespaths.Correctness
Tests run locally:
New/updated coverage:
Performance Gate Status
The required 10M durable paired gate is deferred to the main orchestrator by request. Do not use local 10M artifacts from this branch for merge decisions.
Reason: another worker launched concurrent 10M
unified-benchgates on the same machine while local paired gates were running. I stopped the in-progress #3558 gate and am treating the partial artifact roots as contaminated/aborted:/tmp/gomap_3558_key_arena_gate_20260706_063601/tmp/gomap_3558_key_arena_gate_20260706_064234/tmp/gomap_3558_key_arena_gate_20260706_064521Required deferred command shape for the orchestrator:
Acceptance remains: materially reduce
appendOnlyKeyArena.allocflat allocation objects/space, target >=50% allocation-object reduction if feasible, with no >5% throughput regression in either dataset-write workload on a clean sequential paired gate against currentorigin/main.Status
Draft / not merge-ready until the main orchestrator provides clean sequential paired benchmark evidence and the PR body is updated with those results.
AI reviews are not requested yet because the PR is intentionally waiting on the deferred performance gate.