Andrew Kryczka
a1aa3f8385
Disable manual compaction during ReFitLevel()
( #7250 )
...
Summary:
Manual compaction with `CompactRangeOptions::change_levels` set could
refit to a level targeted by another manual compaction. If
force_consistency_checks were disabled, it could be possible for
overlapping files to be written at that target level.
This PR prevents the possibility by calling `DisableManualCompaction()`
prior to `ReFitLevel()`. It also improves the manual compaction disabling
mechanism to wait for pending manual compactions to complete before
returning, and support disabling from multiple threads.
Fixes https://github.com/facebook/rocksdb/issues/6432 .
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7250
Test Plan:
crash test command that repro'd the bug reliably:
```
$ TEST_TMPDIR=/dev/shm python tools/db_crashtest.py blackbox --simple -target_file_size_base=524288 -write_buffer_size=1048576 -clear_column_family_one_in=0 -reopen=0 -max_key=10000000 -column_families=1 -max_background_compactions=8 -compact_range_one_in=100000 -compression_type=none -compaction_style=1 -num_levels=5 -universal_min_merge_width=4 -universal_max_merge_width=8 -level0_file_num_compaction_trigger=12 -rate_limiter_bytes_per_sec=1048576000 -universal_max_size_amplification_percent=100 --duration=3600 --interval=60 --use_direct_io_for_flush_and_compaction=0 --use_direct_reads=0 --enable_compaction_filter=0
```
Reviewed By: ltamasi
Differential Revision: D23090800
Pulled By: ajkr
fbshipit-source-id: afcbcd51b42ce76789fdb907d8b9ada790709c13
2020-08-14 11:29:52 -07:00
..
2020-07-22 17:25:20 -07:00
2020-08-14 11:29:52 -07:00
2020-08-14 11:29:52 -07:00
2020-08-03 15:23:04 -07:00
2020-08-03 15:23:04 -07:00
2020-08-06 14:25:34 -07:00
2020-06-17 10:57:40 -07:00
2020-07-28 13:05:34 -07:00
2020-07-29 12:24:13 -07:00
2020-07-20 14:19:48 -07:00
2020-07-22 18:32:52 -07:00
2020-07-22 18:32:52 -07:00
2020-07-02 19:25:41 -07:00
2020-07-02 19:25:41 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-05-12 18:23:33 -07:00
2020-08-12 19:30:00 -07:00
2020-07-02 19:25:41 -07:00
2020-08-11 12:41:30 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-08-11 12:41:30 -07:00
2020-08-14 11:29:52 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-06-24 19:07:08 -07:00
2020-07-09 14:35:17 -07:00
2020-06-15 10:47:02 -07:00
2020-06-15 10:47:02 -07:00
2020-07-02 10:22:43 -07:00
2020-08-11 12:41:30 -07:00
2020-06-24 16:22:49 -07:00
2020-02-20 12:09:57 -08:00
2020-08-05 10:44:57 -07:00
2020-08-04 18:52:08 -07:00
2020-07-09 14:35:17 -07:00
2020-07-02 10:22:43 -07:00
2020-03-20 15:26:10 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-08-11 12:41:30 -07:00
2020-08-11 12:41:30 -07:00
2020-07-09 14:35:17 -07:00
2020-08-11 12:41:30 -07:00
2020-07-09 14:35:17 -07:00
2020-07-29 13:39:29 -07:00
2020-07-02 10:22:43 -07:00
2020-08-14 11:29:52 -07:00
2020-08-11 12:41:30 -07:00
2020-08-11 12:41:30 -07:00
2020-08-11 12:41:30 -07:00
2020-08-11 12:41:30 -07:00
2020-08-12 17:31:23 -07:00
2020-08-04 18:52:08 -07:00
2020-07-02 10:22:43 -07:00
2020-07-09 14:35:17 -07:00
2020-02-20 12:09:57 -08:00
2020-07-07 17:26:16 -07:00
2020-07-07 17:26:16 -07:00
2020-07-02 10:22:43 -07:00
2020-07-17 23:27:21 -07:00
2020-07-15 11:03:58 -07:00
2020-07-15 11:03:58 -07:00
2020-06-17 10:57:40 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07: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-08-06 17:19:41 -07:00
2020-08-12 17:31:23 -07:00
2020-08-11 12:41:30 -07:00
2020-06-17 10:57:40 -07: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-06-09 16:51:23 -07:00
2020-04-15 17:40:44 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-07-09 14:35:17 -07:00
2020-06-24 19:07:08 -07:00
2020-02-20 12:09:57 -08:00
2020-05-04 15:08:13 -07:00
2020-08-11 12:41:30 -07:00
2020-02-20 12:09:57 -08:00
2020-06-11 18:42:10 -07:00
2020-04-20 11:39:31 -07:00
2020-06-03 15:55:03 -07:00
2020-06-18 10:09:12 -07:00
2020-03-27 16:04:43 -07: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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-03-04 20:15:25 -08:00
2020-08-12 17:31:23 -07:00
2020-06-27 08:57:31 -07:00
2020-06-04 15:46:27 -07:00
2020-08-05 10:44:57 -07:00
2020-03-02 16:01:00 -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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-07-02 10:22:43 -07:00
2020-02-20 12:09:57 -08:00
2020-04-20 13:24:25 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-02-20 12:09:57 -08:00
2020-08-10 10:48:05 -07: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-02-20 12:09:57 -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-02-20 12:09:57 -08:00
2020-07-02 10:22:43 -07:00
2020-08-12 17:31:23 -07: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-06-29 14:53:17 -07:00
2020-08-03 15:23:04 -07:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-30 15:31:21 -07:00
2020-08-11 09:23:17 -07:00
2020-06-09 16:51:23 -07:00
2020-06-18 10:09:12 -07:00
2020-06-18 10:09:12 -07:00
2020-08-05 16:34:38 -07:00
2020-08-05 16:34:38 -07:00
2020-08-12 13:31:09 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-08-05 16:34:38 -07:00
2020-08-05 16:34:38 -07:00
2020-08-05 16:34:38 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07:00
2020-08-12 17:31:23 -07: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-07-02 19:25:41 -07:00
2020-06-30 12:31:30 -07: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-02-20 12:09:57 -08:00
2020-02-28 14:14:03 -08:00
2020-02-20 12:09:57 -08:00