You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write_batch_to_disk reserves the full length when replacing an existing object #46
Follow-up from #45 review. write_batch_to_disk reserves len before the put while the previous copy still holds previous.bytes, and releases the old reservation only after the reserve succeeds. Replacing an object on a nearly full disk tier therefore needs both sizes free at once; the reserve fails, CacheFull propagates, and flush_all_to_disk drops an entry whose rewrite would not have grown the tier (flush_dropping_hydrated_entry_releases_its_disk_copy shows that outcome).
Fix: read the record before the reserve loop, reserve len - previous.bytes when the value grows and release previous.bytes - len after the put when it shrinks, keeping the record in place if the reserve fails so discard_disk_copy still matches a live reservation. The flush test then needs a different route to CacheFull.
Activity