Conversation
Member
Author
|
The alternative is to use |
tsdb/db_test.go
Outdated
| @@ -2487,7 +2488,7 @@ func TestDBReadOnly_FlushWAL(t *testing.T) { | |||
|
|
|||
| // TestChunkWriter ensures that chunk segment are cut at the set segment size and | |||
Member
There was a problem hiding this comment.
Suggested change
| // TestChunkWriter ensures that chunk segment are cut at the set segment size and | |
| // TestChunkWriter_ReadAfterWrite ensures that chunk segment are cut at the set segment size and |
tsdb/chunks/chunks.go
Outdated
| @@ -570,11 +569,11 @@ func (s *Reader) Chunk(ref uint64) (chunkenc.Chunk, error) { | |||
| } | |||
|
|
|||
| sum := sgmBytes.Range(chkEnd-crc32.Size, chkEnd) | |||
Member
There was a problem hiding this comment.
Suggested change
| sum := sgmBytes.Range(chkEnd-crc32.Size, chkEnd) | |
| sum := sgmBytes.Range(chkDataEnd, chkEnd) |
Contributor
|
👍 I'd focus on getting a fix in and released, we can always microoptimise later. |
roidelapluie
approved these changes
Dec 24, 2019
Member
roidelapluie
left a comment
There was a problem hiding this comment.
Agree. Let's merge to master then cherry-pick to release-2.15 and release 2.15.1.
Added regression test. Fixes #6512 Before (not deterministic result due to concurrency): ``` === RUN TestChunkReader_ConcurrentRead --- FAIL: TestChunkReader_ConcurrentRead (0.01s) db_test.go:2702: unexpected error: checksum mismatch expected:597ad276, actual:597ad276 db_test.go:2702: unexpected error: checksum mismatch expected:dd0cdbc2, actual:dd0cdbc2 FAIL ``` After succuess on multiple runs. Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Member
Author
|
Addressed comments. Once tests (without build - this passed previously, so it's enough) passes, let's merge. |
bwplotka
added a commit
that referenced
this pull request
Dec 24, 2019
Added regression test. Fixes #6512 Before (not deterministic result due to concurrency): ``` === RUN TestChunkReader_ConcurrentRead --- FAIL: TestChunkReader_ConcurrentRead (0.01s) db_test.go:2702: unexpected error: checksum mismatch expected:597ad276, actual:597ad276 db_test.go:2702: unexpected error: checksum mismatch expected:dd0cdbc2, actual:dd0cdbc2 FAIL ``` After succuess on multiple runs. Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
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.
Added regression test.
Fixes #6512
Without this fix, regression test result: (not deterministic result due to concurrency):
cc @brian-brazil @roidelapluie
@roidelapluie I literally used your code with small tweaks.
Signed-off-by: Bartlomiej Plotka bwplotka@gmail.com