speedb icon indicating copy to clipboard operation
speedb copied to clipboard

Proactive flushes: no flushes with WBM from SanitizeOptions

Open Yuval-Ariel opened this issue 1 year ago • 1 comments

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:

  1. checkout 0d43a01c32c20be57e966c070d50d6d6bc85568f
  2. change default of allow_delays_and_stalls to true
  3. run above cmd

Yuval-Ariel avatar Mar 13 '23 09:03 Yuval-Ariel

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

Yuval-Ariel avatar Mar 19 '23 11:03 Yuval-Ariel