mirror of
https://github.com/armink/FlashDB.git
synced 2026-08-17 09:01:46 +08:00
[fdb] Improve the fdb_kv_iterate. Only crc check OK kv will be iterated.
This commit is contained in:
+1
-1
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user