-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
keep-alive: limit wal_end to the oldest transaction still being proce…
…ssed Currently we always return the server's wal_end+1 This approach has a few limits, can cause some issues. If we start processing wal_end A, then receive a keep-alive request with wal_end=A+x and reply A+x+1, this before A if finished processing, then if our process crashes the server will restart at A+x+1 and will never receive it again. To avoid this, this PR returns wal_end+1 only if there are no processing transactions if there are it returns the wal_end of the oldest transaction still in progress. This way we will be guaranteed to start back from there(A and not A+x+1) if we crash.
- Loading branch information
1 parent
74c03ec
commit 265670b
Showing
2 changed files
with
44 additions
and
2 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