-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsql: Fix WAL pull logic on last frame
The WAL sync protocol only allows you to fetch frames for a range. While the protocol does not have mechanism to determine what is the latest frame on the server for pull, it does signal with HTTP status code 400 when you attempt to read a frame that does not exists. Let's use this signal to fix WAL pull logic not to fail always. In the future, we might want to consider extending the protocol to allow clients to proble for latest frame. That, however, will make the protocol a bit more chatty, so I am trying to avoid that as long as I can.
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters