tikv / raft-engine

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

do not rewrite empty log batch #161

Closed tabokie closed 2 years ago

tabokie commented 2 years ago

Signed-off-by: tabokie xy.tao@outlook.com

The splitting logic introduced in #160 could rewrite empty log batch. Fix it. And add test cases.

codecov[bot] commented 2 years ago

Codecov Report

Merging #161 (0fa2f76) into master (de0fa9b) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
+ Coverage   96.94%   96.99%   +0.04%     
==========================================
  Files          26       26              
  Lines        6546     6582      +36     
==========================================
+ Hits         6346     6384      +38     
+ Misses        200      198       -2     
Impacted Files Coverage Δ
src/engine.rs 93.22% <100.00%> (+0.24%) :arrow_up:
src/memtable.rs 99.50% <100.00%> (-0.15%) :arrow_down:
src/purge.rs 97.33% <100.00%> (+1.24%) :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 de0fa9b...0fa2f76. Read the comment docs.