tikv / raft-engine

A persistent storage engine for Multi-Raft log
Apache License 2.0
565 stars 88 forks source link

Optimize `purge_expired_files` #162

Closed tabokie closed 2 years ago

tabokie commented 2 years ago

Several optimizations for purge_expired_files:

Also fix a statistics bug.

codecov[bot] commented 2 years ago

Codecov Report

Merging #162 (9d9daed) into master (141d2e5) will decrease coverage by 0.00%. The diff coverage is 98.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
- Coverage   96.97%   96.96%   -0.01%     
==========================================
  Files          26       26              
  Lines        6582     6597      +15     
==========================================
+ Hits         6383     6397      +14     
- Misses        199      200       +1     
Impacted Files Coverage Δ
src/purge.rs 96.71% <97.67%> (-0.33%) :arrow_down:
src/config.rs 94.00% <100.00%> (+0.89%) :arrow_up:
src/memtable.rs 99.50% <100.00%> (+<0.01%) :arrow_up:
src/metrics.rs 97.50% <100.00%> (+0.02%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 141d2e5...9d9daed. Read the comment docs.