Skip to content

ethdb: Implement DeleteRange in batch #31947

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hadv
Copy link
Contributor

@hadv hadv commented Jun 2, 2025

implement #31945

@hadv hadv requested a review from rjl493456442 as a code owner June 2, 2025 11:17
@rjl493456442 rjl493456442 self-assigned this Jun 3, 2025
@rjl493456442
Copy link
Member

Please fix the compilation.

@hadv hadv force-pushed the batch-range-deletion branch from 23a61a6 to 6f76fec Compare June 4, 2025 06:02
rjl493456442
rjl493456442 previously approved these changes Jun 18, 2025
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

Thank you!

@rjl493456442 rjl493456442 added this to the 1.15.12 milestone Jun 18, 2025
// The nilness will be lost by adding the prefix, explicitly converting it
// to a special flag representing the end of key range.
if end == nil {
end = bytes.Repeat([]byte{0xff}, 32)
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this have an issue if the key is larger than 32 bytes?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. The only possible scenario to hit this scenario is hash-based trie node key, which can in theory be bytes.Repeat([]byte{0xff}, 32). It's the rationale I choose this value as the special marker.

Btw, we also use it for Pebble compaction.

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.

4 participants