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

add ValidateKey method to comparer #3825

Open
RaduBerinde opened this issue Aug 2, 2024 · 0 comments
Open

add ValidateKey method to comparer #3825

RaduBerinde opened this issue Aug 2, 2024 · 0 comments

Comments

@RaduBerinde
Copy link
Member

RaduBerinde commented Aug 2, 2024

We have an Experimental.KeyValidationFunc to validate keys but it is only used in one case (check compacted file bounds). We should promote this to a method on the Comparer and use it more, especially on API calls like Download, Compact, IngestExternalFiles, IngestAndExcise. It is preferable to error out a specific operation than letting an invalid key go through and then either crash later or do something incorrectly.

See cockroachdb/cockroach#128043 for a few cases where CRDB was passing keys that were not properly encoded.

Jira issue: PEBBLE-233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Next
Development

No branches or pull requests

1 participant