-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Unordered head block #3957
Unordered head block #3957
Conversation
…dd constant for current default chunk version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -350,7 +352,7 @@ func NewByteChunk(b []byte, blockSize, targetSize int) (*MemChunk, error) { | |||
// Verify checksums. | |||
expCRC := binary.BigEndian.Uint32(b[blk.offset+l:]) | |||
if expCRC != crc32.Checksum(blk.b, castagnoliTable) { | |||
level.Error(util_log.Logger).Log("msg", "Checksum does not match for a block in chunk, this block will be skipped", "err", ErrInvalidChecksum) | |||
_ = level.Error(util_log.Logger).Log("msg", "Checksum does not match for a block in chunk, this block will be skipped", "err", ErrInvalidChecksum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need this does the linter caused you trouble ? Might be just locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, might be a version mismatch - I usually run the linter outside of docker and it's a bit noisy :)
// []byte here doesn't create allocation because Sum64 has go:noescape directive | ||
// It specifies that the function does not allow any of the pointers passed as arguments | ||
// to escape into the heap or into the values returned from the function. | ||
h := xxhash.Sum64([]byte(line)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recently change this one of us will have to be careful.
} | ||
seriesRes := make([]logproto.Series, 0, len(series)) | ||
for _, s := range series { | ||
// todo(ctovena) not sure we need this sort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't in the end took me long to come back :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Curious to see the rest.
Specially around limitation, and cutting head.
ref #1544 |
This PR is a no-op which adds some new (currently unused) code for an unordered head block. This will lay the groundwork for removing the ordering constraint and breaks this code into it's own PR.