speedb
speedb copied to clipboard
Proactive flushes: no flushes with WBM from SanitizeOptions
Describe the bug setting a WBM for a single db with db_write_buffer_size, causes a WBM to be initialized in SanitizeOptions with the default value of initiate_flushes which is true.
the Proactive flushes feature is then in effect but there are no registered dbs to flush since during db open, the code in db_impl_open.cc::2102 (end of Open func), only registers dbs if the WBM was created and passed in the options with which the db is opened (not via sanitize).
combined with allow_delays_and_stalls = true, this can create a stall as can be seen when running ./db_test --gtest_filter=DBTest.DynamicLevelCompressionPerLevel .
To Reproduce Steps to reproduce the behavior:
- checkout 0d43a01c32c20be57e966c070d50d6d6bc85568f
- change default of allow_delays_and_stalls to true
- run above cmd
currently disabling the test DynamicLevelCompressionPerLevel in db/db_test.cc to be able to merge https://github.com/speedb-io/speedb/pull/423 . reenable the test with the PR to fix this issue