Skip to content

Commit

Permalink
[kvdb] update some log level.
Browse files Browse the repository at this point in the history
  • Loading branch information
armink committed Dec 2, 2023
1 parent 8056e17 commit c1226f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fdb_kvdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,12 +1071,12 @@ static uint32_t new_kv(fdb_kvdb_t db, kv_sec_info_t sector, size_t kv_size)

if ((empty_kv = alloc_kv(db, sector, kv_size)) == FAILED_ADDR) {
if (db->gc_request && !already_gc) {
FDB_DEBUG("Warning: Alloc an KV (size %" PRIu32 ") failed when new KV. Now will GC then retry.\n", (uint32_t)kv_size);
FDB_INFO("Warning: Alloc an KV (size %" PRIu32 ") failed when new KV. Now will GC then retry.\n", (uint32_t)kv_size);
gc_collect_by_free_size(db, kv_size);
already_gc = true;
goto __retry;
} else if (already_gc) {
FDB_DEBUG("Error: Alloc an KV (size %" PRIuLEAST16 ") failed after GC. KV full.\n", kv_size);
FDB_INFO("Error: Alloc an KV (size %" PRIuLEAST16 ") failed after GC. KV full.\n", kv_size);
db->gc_request = false;
}
}
Expand Down Expand Up @@ -1120,7 +1120,7 @@ static bool do_gc(kv_sec_info_t sector, void *arg1, void *arg2)
if (kv.crc_is_ok && (kv.status == FDB_KV_WRITE || kv.status == FDB_KV_PRE_DELETE)) {
/* move the KV to new space */
if (move_kv(db, &kv) != FDB_NO_ERR) {
FDB_DEBUG("Error: Moved the KV (%.*s) for GC failed.\n", kv.name_len, kv.name);
FDB_INFO("Error: Moved the KV (%.*s) for GC failed.\n", kv.name_len, kv.name);
}
}
} while ((kv.addr.start = get_next_kv_addr(db, sector, &kv)) != FAILED_ADDR);
Expand Down

0 comments on commit c1226f3

Please sign in to comment.