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

colblk: add DataBlockDecoder.Validate #4108

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Oct 25, 2024

Add a Validate method to DataBlockDecoder that validates invariants of the decoded data block.

Informs #4103.

Add a Validate method to DataBlockDecoder that validates invariants of the
decoded data block.

Informs cockroachdb#4103.
@jbowens jbowens requested a review from a team as a code owner October 25, 2024 00:50
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@@ -635,6 +635,14 @@ func (w *RawColumnWriter) enqueueDataBlock(
// it's unnecessary.
w.meta.SetLargestPointKey(lastKey.Clone())

if invariants.Enabled {
var dec colblk.DataBlockDecoder
dec.Init(w.opts.KeySchema, serializedBlock)
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this initialize a KeySeeker that we can use?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, no, I was thinking of BlockIter.Init

@jbowens
Copy link
Collaborator Author

jbowens commented Oct 25, 2024

TFTR!

@jbowens jbowens merged commit 62cdcb4 into cockroachdb:master Oct 25, 2024
23 checks passed
@jbowens jbowens deleted the datablockvalidate branch October 25, 2024 13:09
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