Jay Zhuang
32ad0dcafe
Fix a race condition when disable and enable manual compaction ( #9694 )
...
Summary:
In https://github.com/facebook/rocksdb/issues/9659 , when `DisableManualCompaction()` is issued, the foreground
manual compaction thread does not have to wait background compaction
thread to finish. Which could be a problem that the user re-enable
manual compaction with `EnableManualCompaction()`, it may re-enable the
BG compaction which supposed be cancelled.
This patch makes the FG compaction wait on
`manual_compaction_state.done`, which either be set by BG compaction or
Unschedule callback. Then when FG manual compaction thread returns, it
should not have BG compaction running. So shared_ptr is no longer needed
for `manual_compaction_state`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9694
Test Plan: a StressTest and unittest
Reviewed By: ajkr
Differential Revision: D34885472
Pulled By: jay-zhuang
fbshipit-source-id: e6476175b43e8c59cd49f5c09241036a0716c274
2022-03-22 18:09:03 -07:00
..
2021-12-10 11:05:35 -08:00
2022-01-21 11:37:46 -08:00
2022-03-22 18:09:03 -07:00
2022-03-22 18:08:51 -07:00
2021-09-29 04:04:40 -07:00
2022-01-21 11:37:46 -08:00
2021-09-16 17:23:36 -07:00
2021-12-30 12:48:07 -08:00
2022-01-12 08:34:53 -08:00
2021-12-10 08:13:26 -08:00
2021-11-24 14:52:00 -08:00
2021-09-08 12:22:04 -07:00
2021-03-29 17:10:42 -07:00
2021-12-10 08:13:26 -08:00
2022-01-21 11:37:46 -08:00
2022-01-04 16:45:49 -08:00
2021-10-18 23:32:01 -07:00
2022-03-07 15:41:00 -08:00
2021-12-16 17:15:13 -08:00
2022-01-31 11:32:04 -08:00
2021-07-23 08:38:45 -07:00
2022-03-22 18:09:03 -07:00
2021-09-21 09:23:48 -07:00
2021-07-23 08:38:45 -07:00
2021-11-24 14:52:00 -08:00
2022-03-07 15:32:50 -08:00
2021-07-30 12:16:44 -07:00
2020-06-15 10:47:02 -07:00
2021-07-23 08:38:45 -07:00
2021-11-08 11:05:59 -08:00
2021-05-05 14:00:17 -07:00
2021-09-01 14:28:58 -07:00
2021-11-19 17:53:47 -08:00
2021-09-29 04:04:40 -07:00
2021-07-23 08:38:45 -07:00
2021-09-12 15:34:26 -07:00
2021-08-10 11:10:07 -07:00
2020-12-09 21:21:16 -08:00
2021-07-23 08:38:45 -07:00
2022-03-07 15:40:07 -08:00
2021-07-23 08:38:45 -07:00
2021-12-09 12:36:18 -08:00
2021-10-22 10:13:15 -07:00
2022-03-22 18:08:51 -07:00
2022-01-04 16:45:49 -08:00
2022-01-04 16:45:49 -08:00
2021-09-07 13:28:29 -07:00
2021-11-19 17:31:01 -08:00
2021-07-23 08:38:45 -07:00
2022-01-11 10:36:22 -08:00
2022-01-18 17:31:03 -08:00
2022-01-04 16:45:49 -08:00
2022-01-14 11:58:18 -08:00
2021-11-18 17:31:50 -08:00
2021-12-10 11:05:35 -08:00
2021-12-23 11:03:51 -08:00
2021-09-08 07:46:44 -07:00
2021-11-08 11:05:59 -08:00
2021-11-08 11:05:59 -08:00
2021-11-08 11:05:59 -08:00
2021-11-10 10:49:04 -08:00
2021-12-10 11:05:35 -08:00
2021-11-08 11:05:59 -08:00
2021-12-20 23:16:52 -08:00
2021-12-08 14:30:57 -08:00
2021-11-08 15:49:17 -08:00
2021-12-08 14:30:57 -08:00
2021-12-08 14:30:57 -08:00
2020-02-20 12:09:57 -08:00
2021-11-08 11:05:59 -08:00
2022-01-21 11:37:46 -08:00
2021-12-16 17:15:13 -08:00
2022-01-04 16:45:49 -08:00
2021-12-13 09:00:36 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2021-08-03 13:31:10 -07:00
2021-12-03 14:43:14 -08:00
2021-09-29 04:04:40 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2022-01-12 09:31:12 -08:00
2022-01-21 11:37:46 -08:00
2022-01-21 11:37:46 -08:00
2022-01-21 11:37:46 -08:00
2021-12-16 17:15:13 -08:00
2021-07-23 08:38:45 -07:00
2021-10-31 23:11:43 -07:00
2021-10-20 13:17:00 -07:00
2021-09-10 10:00:26 -07:00
2021-11-16 10:20:50 -08:00
2022-01-21 08:25:09 -08:00
2020-02-20 12:09:57 -08:00
2020-11-30 18:11:38 -08:00
2020-08-26 10:39:20 -07:00
2021-01-04 16:01:01 -08:00
2021-06-25 00:47:17 -07:00
2021-03-19 12:09:47 -07:00
2020-02-20 12:09:57 -08:00
2021-03-19 12:09:47 -07:00
2021-09-29 04:04:40 -07:00
2021-09-07 11:31:59 -07:00
2020-02-20 12:09:57 -08:00
2022-01-12 09:31:12 -08:00
2021-12-02 11:45:39 -08:00
2021-12-17 04:20:47 -08:00
2021-12-17 04:20:47 -08:00
2022-01-31 11:32:04 -08:00
2022-01-31 11:32:04 -08:00
2021-05-10 12:50:25 -07:00
2021-11-19 17:53:47 -08:00
2021-11-19 17:53:47 -08:00
2021-11-19 17:53:47 -08:00
2020-02-20 12:09:57 -08:00
2022-01-04 16:45:49 -08:00
2021-12-10 11:05:35 -08:00
2020-12-23 16:55:53 -08:00
2021-09-29 04:04:40 -07:00
2021-09-29 04:04:40 -07:00
2021-03-15 04:34:11 -07:00
2021-07-23 08:38:45 -07:00
2021-03-15 04:34:11 -07:00
2021-01-25 22:09:11 -08:00
2021-09-07 11:31:59 -07:00
2022-01-21 11:37:46 -08:00
2021-09-10 10:00:26 -07:00
2021-03-15 04:34:11 -07:00
2021-10-06 07:48:31 -07:00
2021-10-06 07:48:31 -07:00
2020-10-28 10:12:58 -07:00
2021-03-25 21:18:08 -07:00
2021-10-06 07:48:31 -07:00
2021-06-18 04:57:27 -07:00
2021-06-18 04:57:27 -07:00
2021-09-10 10:00:26 -07:00
2021-07-28 16:44:14 -07:00
2022-01-21 11:37:46 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-09-10 10:00:26 -07:00
2022-03-22 18:08:57 -07:00
2022-01-21 11:37:46 -08:00
2021-11-18 11:43:44 -08:00
2021-03-25 15:00:45 -07:00
2021-11-19 11:37:06 -08:00
2021-12-10 11:05:35 -08:00
2021-09-29 04:04:40 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2021-12-03 14:43:14 -08:00
2022-01-21 11:37:46 -08:00
2022-01-21 11:37:46 -08:00
2022-01-21 11:37:46 -08:00
2021-06-10 12:55:20 -07:00
2021-12-03 14:43:14 -08:00
2021-11-22 09:30:47 -08:00
2022-01-05 16:02:21 -08:00
2022-01-07 18:09:48 -08:00
2022-03-07 15:41:00 -08:00
2022-03-07 15:40:07 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2020-12-09 16:02:12 -08:00
2021-09-21 09:23:48 -07:00
2021-07-30 12:16:44 -07:00
2021-07-30 12:16:44 -07:00
2020-02-20 12:09:57 -08:00
2021-12-10 20:33:46 -08:00
2021-12-10 11:05:35 -08:00
2021-12-10 20:33:46 -08:00
2021-07-07 11:14:05 -07:00
2020-02-20 12:09:57 -08:00
2021-03-18 09:47:31 -07:00
2021-03-18 09:47:31 -07:00
2021-03-18 09:47:31 -07:00
2021-04-21 13:54:02 -07:00
2021-06-18 17:14:51 -07:00