-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NRG: Invalidate pending append entries cache (#6513)
The `n.pae` is an in-memory cache of pending but not yet applied entries. When applying commits we can pull from this cache so we don't need to pull them from disk for example. However, the cache has a bounded size. So if the cache would be fully filled and we'd store a different entry at an index that was cached, we'd apply the wrong (cached) entry. If we get an entry that we can't cache because it's full, we can simply drop the entry from the cache if it exists. If an entry at this index doesn't exist it's a noop, but if it did exist then it clears up room in the cache for the next entries to be stored. Signed-off-by: Maurice van Veen <[email protected]>
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 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