-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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 test for memtable bloom filter with WriteBufferManager #13398
base: main
Are you sure you want to change the base?
Conversation
Summary: ... to ensure proper cache charging. However, this is a somewhat hazardous combination if there are many CFs and could be the target of future work. Test Plan: this is the test
@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
||
// Just the start of a memtable, no Bloom, rounded up to kSizeDummyEntry | ||
ASSERT_GE(cache->GetUsage(), 1024U); | ||
ASSERT_LE(cache->GetUsage(), 256U * 1024U); |
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.
nit: use static constexpr std::size_t kSizeDummyEntry = CacheReservationManagerImplCacheEntryRole::kMisc::GetDummyEntrySize(); ? Same for upper bound below just so it's easier to sea how many kSizeDummyEntry in the upper bound
ASSERT_OK(Put("foo2", "bar2")); | ||
|
||
// Expecting a memtable Bloom of ratio times write_buffer_size, memory tracked | ||
ASSERT_GE(cache->GetUsage(), 1000000U); |
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.
nit: options.write_buffer_size * options.memtable_prefix_bloom_size_ratio instead of hard-coded 1000000U ? Same for 2000000U below
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.
Left some details on making the hard-coded number more readable. Others LGTM
Summary: ... to ensure proper cache charging. However, this is a somewhat hazardous combination if there are many CFs and could be the target of future work.
Test Plan: this is the test