Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRG: Invalidate pending append entries cache #6513

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

MauriceVanVeen
Copy link
Member

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]

@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner February 14, 2025 17:04
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 3c575bf into main Feb 15, 2025
5 checks passed
@derekcollison derekcollison deleted the maurice/pae-cache-invalidate branch February 15, 2025 01:54
neilalexander added a commit that referenced this pull request Feb 18, 2025
Includes the following:

- #6507
- #6497
- #6476
- #6511
- #6513
- #6517
- #6515
- #6519
- #6521

Signed-off-by: Neil Twigg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants