Comments (6)
KV 你都用来存什么数据了?
from flashdb.
朱工:
static struct fdb_kvdb kvdb = { 0 };
static uint32_t boot_count = 0;
static time_t boot_time[10] = {0, 1, 2, 3};
static uint8_t test[4000] = {0};
static struct fdb_default_kv_node default_kv_table[] = {
{"username", "armink", 0}, /* string KV /
{"password", "123456", 0}, / string KV /
{"boot_count", &boot_count, sizeof(boot_count)}, / int type KV /
{"boot_time", &boot_time, sizeof(boot_time)}, / int array type KV /
{"test", &test, sizeof(test)}, / 测试写满后的操作*/
};
stErr = fdb_kv_set_blob(kvdb, "test", fdb_blob_make(&blob, &test, sizeof(test)));
用来存储系统参数,想验证下写满后,能否继续写入,于是做了个实验,每次存4000个数据,发现第二次调用fdb_kv_set_blob写入4000个数据时,返回FDB_SAVED_FULL,第三次调用fdb_kv_set_blob又能够正常写入,目前将分区大小增大到12K,连续调用10次fdb_kv_set_blob都没出现FDB_SAVED_FULL。我想咨询下KV操作时,当写满时,是否需要用户去执行fdb_kv_set_default操作。
from flashdb.
不需要的,fdb_kv_set_default 相当于格式化,用户的数据都被清空了
from flashdb.
你好,也就是说KV数据库写满后,能够自动支持重新从起始地址开始,写入最新参数是吧,如果这样的话,就很方便了。
from flashdb.
目前的文件结构有点复杂,计划何时规整?
from flashdb.
from flashdb.
Related Issues (20)
- 分区越大,插入速度越慢 HOT 2
- sfud_flash_def.h 部分有误 HOT 4
- KVDB Demo 运行出错 HOT 1
- linux的demo程序第一次运行都会卡住 HOT 2
- Error: The KV (@0x0000FF4F) CRC32 check failed!
- Support wear balance
- tsdb
- FR:tsdb读取最新一条数据内容 HOT 1
- TSDB能否调整为递增序列式。 HOT 1
- V2.1.0使用tsdb遇到一个问题,假如tsdb刚好全部写满的时候重启了,再次开机 初始化tsdb的时候,会出现oldest sectors is 0x00000FFF, current using sector is 0xFFFFFFFF, 导致后续无法写入 HOT 1
- 迭代器无法遍历所有键值对 HOT 2
- FDB_GC_EMPTY_SEC_THRESHOLD我想问这个能设置成0吗,我现在只想分配2个扇区给flashDB
- fdb_tsl_status_t end_info_stat[2]这里结束信息为啥需要2呢? HOT 3
- 如何主动进行一次GC
- tsdb 写数据的时候突然重启设备,重启后设备 db->last_time 变成0开始 HOT 10
- 提前标记sector为GC状态,并在kv iterator中跳过待GC的区块 HOT 4
- 希望更新一下RT-Thread 软件包 HOT 2
- FAL 组件里面的 device_table 和 device_table_len 用 const 声明编译器可能会分配 0 地址 HOT 2
- kvdb写满后,写入同名键值对无法写入无法覆盖,且kv大小是扇区的一半时,空间利用率最差,只有一半,fdb_kv_print打印的kv也不全但是get能读到 HOT 1
- [QUESTION] Can this work with ESP32 arduino?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flashdb.