fix: reject Floor in pinned mode instead of leaking GC-pool segments - #490
fix: reject Floor in pinned mode instead of leaking GC-pool segments#490thweetkomputer wants to merge 1 commit into
Conversation
A FloorRequest resolves a large-value floor entry into its own IoStringBuffer. In KV Cache pinned mode GetGlobalRegisteredMemory() returns the shard-private GC pool, whose segments no public API can Recycle, so each large-value Floor permanently drains it -- eventually stalling segment compaction and hanging later large-value Floors. Read already rejects its IoStringBuffer overload in pinned mode for the same reason; Floor has no pinned-destination variant, so reject it too. Regression test issues a Floor against a pinned-mode store and expects InvalidArgs (returns NoError, leaking, without the guard).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesPinned-mode Floor rejection
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Problem
A
FloorRequestresolves a large-value floor entry into its ownIoStringBuffer(floor_req->large_value_). In KV Cache pinned mode,GetGlobalRegisteredMemory()returns the shard-private GC pool, whose segments no public API canRecycle. So everyFloorthat lands on a large-value entry permanently drainsnum_segmentsfrom that pool. Once it empties, background segment compaction spins onYieldToLowPQforever (space reclamation halts) and later large-value Floors hang.Readalready rejects itsIoStringBufferoverload in pinned mode for exactly this reason (pinned callers must use the pinned-destination overloads).Floorhas no pinned-destination variant, and its dispatch was missing the equivalent guard.Fix
Reject
FloorRequestin pinned mode (pinned_memory_chunksnon-empty) withInvalidArgs, mirroring theReadguard.Test
large_value_e2e[pinned]: aFlooragainst a pinned-mode store now returnsInvalidArgs; without the guard it returnsNoError(leaking the segments). Full suite passes (448 assertions).Summary by CodeRabbit
Bug Fixes
Floorrequests involving large values in pinned-memory mode are now rejected with a clearInvalidArgserror instead of being processed unsuccessfully.Tests
Floorrequests are rejected as expected.