[kvdb] Improve the GC speed when in recovery mode.

This commit is contained in:
armink 2023-11-19 11:06:12 +08:00
parent dc6121b448
commit 3dca512285
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,7 @@ static fdb_err_t move_kv(fdb_kvdb_t db, fdb_kv_t kv)
}
if ((kv_addr = alloc_kv(db, &sector, kv->len)) != FAILED_ADDR) {
if (db->in_recovery_check) {
if (db->in_recovery_check && kv->status == FDB_KV_PRE_DELETE) {
struct fdb_kv kv_bak;
char name[FDB_KV_NAME_MAX + 1] = { 0 };
strncpy(name, kv->name, kv->name_len);