Repository navigation
Release - #216
Release#216
Conversation
…ED (#215) * perf(compaction): drop compaction I/O from page cache via FADV_DONTNEED Compaction reads one-pass raw-file/segment inputs and writes segment outputs through the page cache, evicting warm serving data. Track written output ranges per segment and drop them (plus one-pass input pages) with posix_fadvise(FADV_DONTNEED) only after the segment is synced; no-op on non-Linux. Also adds the missing newSeg.Sync() before recompaction metadata publish. Candidate cand_g41znje23g from perfloop case_61m5ctxv01, validated locally (memory-limited Linux containers, mincore-based residency). Signed-off-by: Ovais Tariq <[email protected]> * docs: RFC-008 compaction page cache hygiene Signed-off-by: Ovais Tariq <[email protected]>
Greptile SummaryThis PR adds Linux page-cache advice to discard compaction input and synced output ranges, explicitly syncs recompaction output before publishing metadata, and adds correctness tests, Linux residency benchmarks, and an RFC.
Confidence Score: 4/5The PR appears safe to merge, though input cache advice should be delayed until metadata no longer exposes the source to avoid undermining warm serving reads during compaction. Output ranges are accurately tracked and dropped only after synchronization, but both compaction paths can evict input pages while those files remain the published source for concurrent reads. Files Needing Attention: storage/compaction/compactor.go, storage/compaction/recompactor.go Important Files Changed
Reviews (1): Last reviewed commit: "perf(compaction): drop compaction I/O fr..." | Re-trigger Greptile |
| advice.addOutput(*newSeg, newOffset, totalNeeded) | ||
|
|
||
| // Old segment values are one-pass recompaction input. | ||
| dropFileCache(oldFile, entry.Offset, totalNeeded) |
There was a problem hiding this comment.
Input advice evicts serving pages
If serving reads overlap compaction, this call discards old-segment pages while published metadata still directs reads to that segment, forcing warm values to be reread from disk; the raw-file drop in copyFileIntoSegment has the same pre-commit behavior.
Knowledge Base Used: Storage Lifecycle: Compaction, Eviction, and Deletion
|
🎉 This PR is included in version 1.10.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Note
Cursor Bugbot is generating a summary for commit 99e3f52. Configure here.