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

Add internal kernel API /api/sqlite/flushTransaction #10005

Closed
IAliceBobI opened this issue Dec 28, 2023 · 2 comments
Closed

Add internal kernel API /api/sqlite/flushTransaction #10005

IAliceBobI opened this issue Dec 28, 2023 · 2 comments
Assignees
Milestone

Comments

@IAliceBobI
Copy link

IAliceBobI commented Dec 28, 2023

希望加一个API,等待当前所有DB任务都写盘后才返回。

希望加一个API,等待当前所有DB任务都写盘后才返回。

In what scenarios do you need this feature?

有没有可能加一个flash db的API。等待所有pending的任务都给刷盘了。
有时候调用一些API后,虽然成功了,但db里是没有相关数据的。
插件中只能等待,或者间隔地循环尝试。插件引入这种设计,比较难维护。

另外,前端是否也能提供一个接口,等待编辑器里面的事务,也发送到后端。
有时我在编辑器写入内容,到内容出现在db,这个时间不好把握。

如果前端后端都有flash 接口,那就能准确地知道,何时查db,能查到刚刚写入的数据。

Describe the optimal solution

如果加入一个flushdb类似的api.
插件中可以这样用:
await createDoc()
await flushDB()
await queryDB()

Describe the candidate solution

No response

Other information

No response

@88250
Copy link
Member

88250 commented Dec 28, 2023 via email

@IAliceBobI
Copy link
Author

@88250 也行,只是我目前不知道怎么搞。后续我再研究吧。先加内核的。谢谢!

@88250 88250 self-assigned this Dec 28, 2023
@88250 88250 changed the title 希望加一个API,等待当前所有DB任务都写盘后才返回。 Add internal kernel API /api/sqlite/flushTransaction Dec 28, 2023
@88250 88250 added this to the 2.12.0 milestone Dec 28, 2023
@88250 88250 closed this as completed Dec 28, 2023
@88250 88250 mentioned this issue May 16, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants