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

release-19.1: storage: drop raftentry.Cache data in applySnapshot #37064

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

ajwerner
Copy link
Contributor

Backport 2/2 commits from #37055.

/cc @cockroachdb/release


This PR adds a new .Drop method to the raftentry.Cache which will clear all data associated with a range more efficiently than calling .Clear with a large index. The second commit then uses this call when applying a snapshot to ensure that stale cached raft entries are never used.

Fixes #37056.

Add logic to clear cached raft log entries when applying a snapshot.

Release note: None
@ajwerner ajwerner requested a review from a team April 24, 2019 03:05
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner ajwerner requested a review from nvanbenschoten April 24, 2019 12:31
@ajwerner ajwerner merged commit 25dd36f into cockroachdb:release-19.1 Apr 24, 2019
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.

3 participants