mirror of
https://github.com/armink/FlashDB.git
synced 2025-01-16 20:12:52 +08:00
[kvdb] Improve the GC speed when in recovery mode.
This commit is contained in:
parent
dc6121b448
commit
3dca512285
@ -981,7 +981,7 @@ static fdb_err_t move_kv(fdb_kvdb_t db, fdb_kv_t kv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((kv_addr = alloc_kv(db, §or, kv->len)) != FAILED_ADDR) {
|
if ((kv_addr = alloc_kv(db, §or, 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;
|
struct fdb_kv kv_bak;
|
||||||
char name[FDB_KV_NAME_MAX + 1] = { 0 };
|
char name[FDB_KV_NAME_MAX + 1] = { 0 };
|
||||||
strncpy(name, kv->name, kv->name_len);
|
strncpy(name, kv->name, kv->name_len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user