storage: adjust raft log size correctly when replacing sideloaded entries#31926
Merged
craig[bot] merged 3 commits intocockroachdb:masterfrom Oct 26, 2018
Merged
Conversation
…ries This follows up on a comment of @nvanbenschoten in cockroachdb#31914. Unfortunately, it seems really hairy to come up with a test for this, so a bit of refactoring will be needed. Release note: None
In preparation for writing a unit test. No functionality changes intended in this commit. Release note: None
Member
nvb
approved these changes
Oct 26, 2018
Contributor
nvb
left a comment
There was a problem hiding this comment.
Reviewed 5 of 5 files at r1, 2 of 2 files at r2, 1 of 1 files at r3.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/storage/replica_sideload_disk.go, line 118 at r1 (raw file):
func (ss *diskSideloadStorage) purgeFile(ctx context.Context, filename string) (int64, error) { // TODO(tschottdorf): this should all be done through the env. As written, // the sizes returned here will be wrong if encryption is one. We want the
s/one/on/
pkg/storage/replica_sideload_test.go, line 366 at r3 (raw file):
assertCreated(false) // Repopulate with a few entries at indexes=1,2,4,5 and term 10 to test `maybePurgeSideloaded`
Not index 5.
Release note: None
b393ce0 to
12756fa
Compare
tbg
commented
Oct 26, 2018
Member
Author
tbg
left a comment
There was a problem hiding this comment.
TFTR!
bors r=nvanbenschoten
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/storage/replica_sideload_disk.go, line 118 at r1 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
s/one/on/
Done.
pkg/storage/replica_sideload_test.go, line 366 at r3 (raw file):
Previously, nvanbenschoten (Nathan VanBenschoten) wrote…
Not index 5.
Done.
craig bot
pushed a commit
that referenced
this pull request
Oct 26, 2018
31881: exec: distinct manages its own scratch column r=jordanlewis a=jordanlewis Previously, distinct relied on its input batch to have a scratch boolean column for working. It's unnecessary - instead, manage the scratch boolean directly during construction. Release note: None 31926: storage: adjust raft log size correctly when replacing sideloaded entries r=nvanbenschoten a=tschottdorf This follows up on a comment of @nvanbenschoten in #31914 which highlighted yet another potential (though hopefully rare) source of raft log size not being reduced correctly. Release note: None Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com> Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
Contributor
Build succeeded |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows up on a comment of @nvanbenschoten in #31914 which highlighted yet
another potential (though hopefully rare) source of raft log size not being
reduced correctly.
Release note: None