-
Notifications
You must be signed in to change notification settings - Fork 511
sstable: do not invalidate data block if bloomfilter returns false #5259
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
base: master
Are you sure you want to change the base?
sstable: do not invalidate data block if bloomfilter returns false #5259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)
sstable/reader_iter_two_lvl.go
line 447 at r1 (raw file):
} if !mayContain { // In the no-error bloom filter miss case, the key definitely not in table.
[nit] is definitely not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbowens reviewed all commit messages.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @sumeerbhola and @xxmplus)
-- commits
line 2 at r1:
nit: s/feat:/sstable:/
sstable/reader_iter_two_lvl.go
line 449 at r1 (raw file):
// In the no-error bloom filter miss case, the key definitely not in table. // We can avoid invalidating the already loaded block since the caller is // not allowed to call Next when SeekPrefixGE returns nil.
I wonder if we could add an assertion for this in invariants
builds. We'd need to remember the previous operation (or at least whether it was a SeekPrefixGE). We could store this information in an invariants.Value[T]
type so that it compiles away on production builds, and then in Next()
assert that the block is not invalidated in invariants.Enabled
builds if the previous op was a SeekPrefixGE
33a7aea
to
1a60cb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @jbowens, @RaduBerinde, and @sumeerbhola)
Previously, jbowens (Jackson Owens) wrote…
nit: s/feat:/sstable:/
updated.
sstable/reader_iter_two_lvl.go
line 447 at r1 (raw file):
Previously, RaduBerinde wrote…
[nit] is definitely not
fixed.
sstable/reader_iter_two_lvl.go
line 449 at r1 (raw file):
Previously, jbowens (Jackson Owens) wrote…
I wonder if we could add an assertion for this in
invariants
builds. We'd need to remember the previous operation (or at least whether it was a SeekPrefixGE). We could store this information in aninvariants.Value[T]
type so that it compiles away on production builds, and then inNext()
assert that the block is not invalidated ininvariants.Enabled
builds if the previous op was a SeekPrefixGE
added.
4b5e0b3
to
01cc1c1
Compare
@jbowens TFTR! I could use another review. |
Do not invalidate data block if bloomfilter returns false.
Fixes #4788