From 7d81aedcd5e85ad45b23603b2aaa492bc4cc519d Mon Sep 17 00:00:00 2001 From: yuval-io <105581454+Yuval-Ariel@users.noreply.github.com> Date: Sun, 31 Dec 2023 08:54:53 +0200 Subject: [PATCH] Options: Set level_compaction_dynamic_level_bytes as false by default (#791) This flag is not working properly with Speedb. see https://github.com/speedb-io/speedb/issues/786 for more details --- HISTORY.md | 1 + include/rocksdb/advanced_options.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 715254f6f1..29abd6d043 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -18,6 +18,7 @@ Based on RocksDB 8.6.7 ### Miscellaneous * Remove leftover references to ROCKSDB_LITE (#755). * Options: Set compaction_readahead_size default to 0. The current default of 2Mb is not optimal for most of our use cases. Having a value of 0 means that the FS will use its default size for prefetching (true only with https://github.com/speedb-io/speedb/pull/788). +* Options: Set level_compaction_dynamic_level_bytes as false by default. This flag is not working properly with Speedb. see https://github.com/speedb-io/speedb/issues/786 for more details. ## Hazlenut 2.7.0 (27/10/2023) Based on RocksDB 8.1.1 diff --git a/include/rocksdb/advanced_options.h b/include/rocksdb/advanced_options.h index f22ade185d..6542ca42a9 100644 --- a/include/rocksdb/advanced_options.h +++ b/include/rocksdb/advanced_options.h @@ -1,3 +1,17 @@ +// Copyright (C) 2023 Speedb Ltd. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License @@ -680,7 +694,7 @@ struct AdvancedColumnFamilyOptions { // https://github.com/facebook/rocksdb/wiki/Leveled-Compaction#migrating-from-level_compaction_dynamic_level_bytesfalse-to-level_compaction_dynamic_level_bytestrue // // Default: true - bool level_compaction_dynamic_level_bytes = true; + bool level_compaction_dynamic_level_bytes = false; // Allows RocksDB to generate files that are not exactly the target_file_size // only for the non-bottommost files. Which can reduce the write-amplification