rocksdb/db/db_impl
Jay Zhuang d9e71fb2c5 Fix periodic_task unable to re-register the same task type (#10379)
Summary:
Timer has a limitation that it cannot re-register a task with the same name,
because the cancel only mark the task as invalid and wait for the Timer thread
to clean it up later, before the task is cleaned up, the same task name cannot
be added. Which makes the task option update likely to fail, which basically
cancel and re-register the same task name. Change the periodic task name to a
random unique id and store it in periodic_task_scheduler.

Also refactor the `periodic_work` to `periodic_task` to make each job function
as a `task`.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10379

Test Plan: unittests

Reviewed By: ajkr

Differential Revision: D38000615

Pulled By: jay-zhuang

fbshipit-source-id: e4135f9422e3b53aaec8eda54f4e18ce633a279e
2022-08-25 18:52:37 -07:00
..
compacted_db_impl.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
compacted_db_impl.h Add API for writing wide-column entities (#10242) 2022-06-25 15:30:47 -07:00
db_impl.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
db_impl.h Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
db_impl_compaction_flush.cc WritableFileWriter tries to skip operations after failure (#10489) 2022-08-10 10:19:20 -07:00
db_impl_debug.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
db_impl_experimental.cc Remove unused fields from FileMetaData (temporarily) (#10443) 2022-08-01 17:56:13 -07:00
db_impl_files.cc Do not hold mutex when write keys if not necessary (#7516) 2022-07-21 13:35:36 -07:00
db_impl_open.cc Fix periodic_task unable to re-register the same task type (#10379) 2022-08-25 18:52:37 -07:00
db_impl_readonly.cc Add support for wide-column point lookups (#10540) 2022-08-19 11:51:12 -07:00
db_impl_readonly.h Add API for writing wide-column entities (#10242) 2022-06-25 15:30:47 -07:00
db_impl_secondary.cc Add support for wide-column point lookups (#10540) 2022-08-19 11:51:12 -07:00
db_impl_secondary.h Update code comment and logging for secondary instance (#10260) 2022-07-05 10:09:44 -07:00
db_impl_write.cc Prevent a case of WriteBufferManager flush thrashing (#6364) 2022-08-17 15:53:40 -07:00