Closed Horusiath closed 1 week ago
When a user wants to confirm whether the server has saved their data, do we need to query the database? Will it take too long for the user to notice that the data has been saved?
On the current main branch there's no such confirmation. In this branch, if we use save collab with write_immediate
option it will try to write collab down immediately (without using a queue) and return when it's completed.
I was thinking about adding something like Option<tokio::sync::oneshot::Sender<Result<()>>>
as a method param that would be confirmed when persister loop actually manages to save the collab.
Before implementing a queue, we encountered a pool timeout issue. For instance, simultaneous writes or other API endpoints occupying pool connections could lead to pool timeouts. If pool timeouts occur more frequently, how can we address this issue?
This PR replaced Redis pending collab writes queue with in-process channel. There are few reasons for that: