[fdb] Improve the fdb_kv_iterate. Only crc check OK kv will be iterated.

This commit is contained in:
armink 2023-10-15 11:46:28 +08:00
parent 5a8d7d0842
commit ab4c69f302
1 changed files with 1 additions and 1 deletions

View File

@ -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++;