diff --git a/HISTORY.md b/HISTORY.md index 715254f6f1..4e4aaee589 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,6 +14,7 @@ Based on RocksDB 8.6.7 * Stall deadlock consists small cfs (#637). * Proactive Flushes: Fix a race in the ShouldInitiateAnotherFlushMemOnly that may cause the method to return an incorrect answer (#758). * Fix CI failure after changing compation_readahead_size default to 0 (#794). +* Compaction: Restore SetupForCompaction functionality. Specifically, hint POSIX_FADV_NORMAL for compaction input files.See https://github.com/speedb-io/speedb/issues/787 for full details. ### Miscellaneous * Remove leftover references to ROCKSDB_LITE (#755). diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index 0b148a38d7..498bdfab14 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -1193,7 +1193,9 @@ Status BlockBasedTable::PrefetchIndexAndFilterBlocks( return s; } -void BlockBasedTable::SetupForCompaction() {} +void BlockBasedTable::SetupForCompaction() { + rep_->file->file()->Hint(FSRandomAccessFile::kNormal); +} TablePinningPolicy* BlockBasedTable::GetPinningPolicy() const { return rep_->table_options.pinning_policy.get();