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 a KeySchema-specific header #4084

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

RaduBerinde
Copy link
Member

We add a fixed-size KeySchema-specific header to the beginning of the
custom block header. A KeySchema implementation can store there
information and retrieve it when initializing the key seeker.

We use this to add a byte to cockroach blocks which indicates what
types of suffixes are contained in the block (mvcc, empty, non-mvcc).
This will be used for optimized fast paths for the common cases.

@RaduBerinde RaduBerinde requested a review from a team as a code owner October 21, 2024 03:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

:lgtm:

nice

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RaduBerinde)

We add a fixed-size KeySchema-specific header to the beginning of the
custom block header. A KeySchema implementation can store there
information and retrieve it when initializing the key seeker.

We use this to add a byte to cockroach blocks which indicates what
types of suffixes are contained in the block (mvcc, empty, non-mvcc).
This will be used for optimized fast paths for the common cases.
@RaduBerinde RaduBerinde merged commit 5e687eb into cockroachdb:master Oct 21, 2024
23 checks passed
@RaduBerinde RaduBerinde deleted the custom-header branch October 21, 2024 19:45
@RaduBerinde
Copy link
Member Author

I was wondering - should we encode the size of the keyschema header as well? Seems fragile in that if we change KeySchema.HeaderSize we will end up reading garbage.

@jbowens
Copy link
Collaborator

jbowens commented Oct 22, 2024

Yeah I think that's a good idea

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