Skip to content

Conversation

xxmplus
Copy link
Contributor

@xxmplus xxmplus commented Jun 5, 2025

do not invalidate data block if bloom filter returns false in SeekPrefixGE()

This is a DRAFT.

I don't get it why this proposal is beneficial 🤔. If I understand it correctly, the only valid operation after a successful SeekPrefixGE() is Next(). Now, if the prefix is definitely not in the block, Next() is then not a meaningful operation before another seek is called. What's the point to keep the data block around?

Also how do we prevent caller from calling Next() as mentioned in the comment? I must have missed something... 😕

It was necessary in earlier versions of the code since the caller was allowed to call Next when SeekPrefixGE returned nil. This is no longer allowed.

concerns: #4788

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@xxmplus xxmplus requested review from jbowens and RaduBerinde June 5, 2025 15:11
@xxmplus xxmplus closed this Aug 29, 2025
@xxmplus xxmplus deleted the i4788-improve-block-invalidation branch August 29, 2025 18:29
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.

2 participants