rocksdb/db/compaction
Chdy 110ce5f4a3 fix: Round-Robin pri under leveled compaction allows subcompactions b… (#12843)
Summary:
### Summary: Round-Robin pri under leveled compaction allows subcompactions by default is not compatible with PlainTable

```c++
bool Compaction::ShouldFormSubcompactions() const {
  if (cfd_ == nullptr) {
    return false;
  }

  // Round-Robin pri under leveled compaction allows subcompactions by default
  // and the number of subcompactions can be larger than max_subcompactions_
  if (cfd_->ioptions()->compaction_pri == kRoundRobin &&
      cfd_->ioptions()->compaction_style == kCompactionStyleLevel) {
    return output_level_ > 0;
  }

  if (max_subcompactions_ <= 1) {
    return false;
  }
```

PlainTable does not support Subcompaction, including when AdaptiveTable is applied to PlainTable.  subcompaction by default will result in the following error in some scenarios.

```c++
void PlainTableIterator::Seek(const Slice& target) {
  if (use_prefix_seek_ != !table_->IsTotalOrderMode()) {
    // This check is done here instead of NewIterator() to permit creating an
    // iterator with total_order_seek = true even if we won't be able to Seek()
    // it. This is needed for compaction: it creates iterator with
    // total_order_seek = true but usually never does Seek() on it,
    // only SeekToFirst().
    status_ = Status::InvalidArgument(
        "total_order_seek not implemented for PlainTable.");
    offset_ = next_offset_ = table_->file_info_.data_end_offset;
    return;
  }
```

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

Reviewed By: ajkr

Differential Revision: D59433477

Pulled By: cbi42

fbshipit-source-id: fb780ba7f7e8efdfedb7480abf14dd38e0b63677
2024-07-08 12:25:11 -07:00
..
clipping_iterator.h Refactor AddRangeDels() + consider range tombstone during compaction file cutting (#11113) 2023-02-22 12:28:18 -08:00
clipping_iterator_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
compaction.cc fix: Round-Robin pri under leveled compaction allows subcompactions b… (#12843) 2024-07-08 12:25:11 -07:00
compaction.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
compaction_iteration_stats.h Add initial support for TimedPut API (#12419) 2024-03-14 15:44:55 -07:00
compaction_iterator.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_iterator.h Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_iterator_test.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job.cc fix: Round-Robin pri under leveled compaction allows subcompactions b… (#12843) 2024-07-08 12:25:11 -07:00
compaction_job.h Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00
compaction_job_stats_test.cc Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
compaction_job_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
compaction_outputs.cc Preserve TimedPut on penultimate level until it actually expires (#12543) 2024-04-30 11:16:02 -07:00
compaction_outputs.h Preserve TimedPut on penultimate level until it actually expires (#12543) 2024-04-30 11:16:02 -07:00
compaction_picker.cc Fix crash in CompactFiles() of conflict range under preclude_last_level_data_seconds > 0 (#12628) 2024-05-13 13:12:06 -07:00
compaction_picker.h Fix crash in CompactFiles() of conflict range under preclude_last_level_data_seconds > 0 (#12628) 2024-05-13 13:12:06 -07:00
compaction_picker_fifo.cc default_write_temperature option (#12388) 2024-02-28 14:36:13 -08:00
compaction_picker_fifo.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
compaction_picker_level.cc Limit compaction input files expansion (#12484) 2024-03-29 11:34:29 -07:00
compaction_picker_level.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
compaction_picker_test.cc Improve universal compaction sorted-run trigger (#12477) 2024-05-24 10:10:31 -07:00
compaction_picker_universal.cc Improve universal compaction sorted-run trigger (#12477) 2024-05-24 10:10:31 -07:00
compaction_picker_universal.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
compaction_service_job.cc Update APIs to support generic unique identifier format (#12384) 2024-03-01 09:55:30 -08:00
compaction_service_test.cc Update Remote Compaction Tests to include more than one CF (#12430) 2024-03-18 15:40:48 -07:00
compaction_state.cc Tiered Compaction: per key placement support (#9964) 2022-07-13 20:54:49 -07:00
compaction_state.h Tiered Compaction: per key placement support (#9964) 2022-07-13 20:54:49 -07:00
file_pri.h Avoid shifting component too large error in FileTtlBooster (#11673) 2023-08-04 14:29:50 -07:00
sst_partitioner.cc Remove FactoryFunc from LoadXXXObject (#11203) 2023-02-17 12:54:07 -08:00
subcompaction_state.cc Refactor Compaction file cut ShouldStopBefore() (#10629) 2022-09-14 22:09:12 -07:00
subcompaction_state.h Refactor AddRangeDels() + consider range tombstone during compaction file cutting (#11113) 2023-02-22 12:28:18 -08:00
tiered_compaction_test.cc Add CompactForTieringCollector to support automatically trigger compaction for tiering use case (#12760) 2024-06-18 10:51:29 -07:00