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

ts数据库存满后如何处理? #9

Closed
xql923 opened this issue Jul 3, 2020 · 7 comments
Closed

ts数据库存满后如何处理? #9

xql923 opened this issue Jul 3, 2020 · 7 comments

Comments

@xql923
Copy link

xql923 commented Jul 3, 2020

你好,请问,对于一个ts数据库,如果数据存满空间后,会如何处理?删除最早的数据而插入最新的数据吗

@armink
Copy link
Owner

armink commented Jul 3, 2020

取决于数据库的设置,设置为滚动保存时,会覆盖最早的,否则就提示插入失败了,需要用户手动清空数据库

详见 control API https://github.com/armink/FlashDB/blob/master/src/fdb_tsdb.c#L671

@xql923
Copy link
Author

xql923 commented Jul 3, 2020

谢谢,请问这个软件有详细的使用说明书吗?

@xql923
Copy link
Author

xql923 commented Jul 3, 2020

请问,fdb_tsl_query_count(fdb_tsdb_t db, fdb_time_t from, fdb_time_t to, fdb_tsl_status_t status),这个函数中,fdb_tsl_status_t status主要做什么作用?

@xql923
Copy link
Author

xql923 commented Jul 3, 2020

我看说明上修改状态:
NOTE: The actions to modify the state must be in order.
* FDB_TSL_WRITE -> FDB_TSL_USER_STATUS1 -> FDB_TSL_DELETED -> FDB_TSL_USER_STATUS2
这些状态位,必须顺序修改吗?

@armink
Copy link
Owner

armink commented Jul 3, 2020

更多的文档在准备中,可以先看一下 sample 里的示例,快速学习一下

@xql923
Copy link
Author

xql923 commented Jul 3, 2020

谢谢!正在阅读源代码

@yolee599
Copy link

TSDB 启用滚动写入,当可用扇区写满的时候,是不是最早的一整个扇区的数据都会被清除,而不是一条一条清除?

@armink armink closed this as completed Oct 1, 2021
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

3 participants