Closed shihang-zhang closed 1 year ago
Hi armink, I have done a test and please refer to the following for some of the test log. The code runs as designed. Thanks!
[FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 3, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 2, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00001000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00001000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00001800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00001800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00000000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00001000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00001000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00001800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00001800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00000000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000000 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1425) Trigger a GC check after created KV. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1295) The remain empty sector is 1, GC threshold is 1. [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1265) Collect a sector @0x00000800 [FlashDB][kv][knx_os] (E:\3\0302lmg\Component\flashdb\src\FlashDB\src\fdb_kvdb.c:1277) oldest_addr is @0x00001000
感谢 @shihang-zhang ,PR 已经合并了
feat: add new sector iterator function to start iterating from last gc sector.)