tikv / raft-engine

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

fix `LogBatch::is_empty()` #212

Closed tabokie closed 2 years ago

tabokie commented 2 years ago

Adding an empty list of entries to log batch should not change the output of is_empty().

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

codecov[bot] commented 2 years ago

Codecov Report

Merging #212 (2ee09c3) into master (2fe0c36) will decrease coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
- Coverage   96.98%   96.96%   -0.02%     
==========================================
  Files          28       28              
  Lines        7687     7704      +17     
==========================================
+ Hits         7455     7470      +15     
- Misses        232      234       +2     
Impacted Files Coverage Δ
src/log_batch.rs 97.34% <100.00%> (+0.05%) :arrow_up:
src/consistency.rs 91.11% <0.00%> (-2.23%) :arrow_down:
src/codec.rs 98.34% <0.00%> (-0.34%) :arrow_down:

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 2fe0c36...2ee09c3. Read the comment docs.