Skip to content

Commit

Permalink
[fdb] Improve the fdb_kv_iterate. Only crc check OK kv will be iterated.
Browse files Browse the repository at this point in the history
  • Loading branch information
armink committed Oct 15, 2023
1 parent 5a8d7d0 commit ab4c69f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fdb_kvdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ bool fdb_kv_iterate(fdb_kvdb_t db, fdb_kv_iterator_t itr)
}
do {
read_kv(db, kv);
if (kv->status == FDB_KV_WRITE) {
if (kv->status == FDB_KV_WRITE && kv->crc_is_ok == true) {
/* We got a valid kv here. */
/* If iterator statistics is needed */
itr->iterated_cnt++;
Expand Down

0 comments on commit ab4c69f

Please sign in to comment.