Skip to content

v0.4.3

Choose a tag to compare

@pardnchiu pardnchiu released this 10 Apr 10:44
· 11 commits to master since this release

v0.4.2 -> v0.4.3

Summary

Switch AOF compaction trigger from line count to byte size with a 1MB floor, so compaction reflects actual disk waste and replay cost instead of record count.

翻譯 將 AOF 壓縮觸發條件從行數改為位元組大小並設定 1MB 門檻,讓壓縮時機貼近實際磁碟浪費與 replay 成本,而非單純的記錄筆數。

Changes

PERF

  • Replace line-count-based compaction trigger with byte-size tracking (aofSize / aofSizeBaseline)
  • Set 1MB minimum size floor before compaction can fire, preventing thrashing on small databases
  • Trigger compaction when aofSize >= max(baseline, 1MB) * 2, giving compaction cost proper amortization
  • Update replayAOF to accumulate byte size instead of line count, and reuse scanner bytes to avoid extra allocations
翻譯
  • 以位元組追蹤 (aofSize / aofSizeBaseline) 取代基於行數的壓縮觸發條件
  • 設定 1MB 最小門檻,避免小型資料庫頻繁壓縮造成 thrashing
  • 觸發條件改為 aofSize >= max(baseline, 1MB) * 2,讓壓縮成本得到合理攤銷
  • replayAOF 改以位元組累計大小,並直接重用 scanner bytes 減少額外配置

Files Changed

File Status Tag
core/store/aof.go Modified PERF
core/store/store.go Modified PERF

Generated by SKILL