forked from facebook/kuduraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log specialization should return whether a trim actually happened or it
was a no-op Summary: This is valuable, because the Raft Application (e.g. Mysql Raft plugin) can call TruncateCallbackWithRaftLock by passing in -1 to do the postponed trimming. However it also benefits from the knowledge that actual trimming took place. If trim happens certain side-effects will have to be taken care of like restarting state machine appliers to get rid of cached transactions. Test Plan: The testing happened via Dead Primary Promotion tests. With and Without we were able to mitigate a dataloss situation in which the Dead Primary (instance which was erstwhile primary and stepped down and then had a trim), had some transactions cached in its applier cache waiting for confirmation from Raft. Without removing the entries from the cache, extra rows were present in the database. Reviewers: vinaybhat, abhinavsharma, yashtc Subscribers: Tasks: Tags:
- Loading branch information
1 parent
6cf6d37
commit cff169f
Showing
4 changed files
with
9 additions
and
5 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
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