1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 // This source code is licensed under both the GPLv2 (found in the 3 // COPYING file in the root directory) and Apache 2.0 License 4 // (found in the LICENSE.Apache file in the root directory). 5 6 #pragma once 7 8 #include "rocksdb/db.h" 9 #include "rocksdb/status.h" 10 11 namespace ROCKSDB_NAMESPACE { 12 namespace experimental { 13 14 // Supported only for Leveled compaction 15 Status SuggestCompactRange(DB* db, ColumnFamilyHandle* column_family, 16 const Slice* begin, const Slice* end); 17 Status SuggestCompactRange(DB* db, const Slice* begin, const Slice* end); 18 19 // Move all L0 files to target_level skipping compaction. 20 // This operation succeeds only if the files in L0 have disjoint ranges; this 21 // is guaranteed to happen, for instance, if keys are inserted in sorted 22 // order. Furthermore, all levels between 1 and target_level must be empty. 23 // If any of the above condition is violated, InvalidArgument will be 24 // returned. 25 Status PromoteL0(DB* db, ColumnFamilyHandle* column_family, 26 int target_level = 1); 27 28 } // namespace experimental 29 } // namespace ROCKSDB_NAMESPACE 30