Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvdb写满后,写入同名键值对无法写入无法覆盖,且kv大小是扇区的一半时,空间利用率最差,只有一半,fdb_kv_print打印的kv也不全但是get能读到 #306

Open
YanChao001 opened this issue Jul 22, 2024 · 1 comment

Comments

@YanChao001
Copy link

letter:/$ file -l

test1=blob @0x00000019 1024bytes
test2=blob @0x00000819 1024bytes
test3=blob @0x00001019 1024bytes
test4=blob @0x00001819 1024bytes
test5=blob @0x00002019 1024bytes
test6=blob @0x00002819 1024bytes
test7=blob @0x00003019 1024bytes
test8=blob @0x00003819 1024bytes
test9=blob @0x00004019 1024bytes
test10=blob @0x0000481A 1024bytes
test11=blob @0x0000501A 1024bytes
test12=blob @0x0000581A 1024bytes
test13=blob @0x0000601A 1024bytes
test14=blob @0x0000681A 1024bytes
test15=blob @0x0000701A 1024bytes
test16=blob @0x0000781A 1024bytes
test17=blob @0x0000801A 1024bytes
test18=blob @0x0000881A 1024bytes
test19=blob @0x0000901A 1024bytes
test20=blob @0x0000981A 1024bytes
test21=blob @0x0000A01A 1024bytes
test22=blob @0x0000A81A 1024bytes
test23=blob @0x0000B01A 1024bytes

mode: next generation
size: 24141/47104 bytes.
letter:/$ file -w test1

[FlashDB][kv][user][kvdb_user] (../Code/ThirdParty/FlashDB/src/fdb_kvdb.c:928) Trigger a GC check after alloc KV failed.
[FlashDB][kv][user][kvdb_user] Warning: Alloc an KV (size 1041) failed when new KV. Now will GC then retry.
[FlashDB][kv][user][kvdb_user] (../Code/ThirdParty/FlashDB/src/fdb_kvdb.c:1149) The remain empty sector is 1, GC threshold is 1.
[FlashDB][kv][user][kvdb_user] (../Code/ThirdParty/FlashDB/src/fdb_kvdb.c:928) Trigger a GC check after alloc KV failed.
[FlashDB][kv][user][kvdb_user] Error: Alloc an KV (size 0) failed after GC. KV full.
letter:/$

@armink
Copy link
Owner

armink commented Aug 2, 2024

这个 KV 格式是 blob 类型,并不是可以支持打印的 string 字符串,所以不会显示的,只会显示大小

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants