diff --git a/HISTORY.md b/HISTORY.md index dc4b320a6..97fa172d5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,6 +10,7 @@ * Fixed an issue where the `READ_NUM_MERGE_OPERANDS` ticker was not updated when the base key-value or tombstone was read from an SST file. * Fixed a memory safety bug when using a SecondaryCache with `block_cache_compressed`. `block_cache_compressed` no longer attempts to use SecondaryCache features. * Fixed a regression in scan for async_io. During seek, valid buffers were getting cleared causing a regression. +* Tiered Storage: fixed excessive keys written to penultimate level in non-debug builds. ### New Features * Add basic support for user-defined timestamp to Merge (#10819). diff --git a/db/compaction/compaction_iterator.cc b/db/compaction/compaction_iterator.cc index 788c8876c..9f54f7813 100644 --- a/db/compaction/compaction_iterator.cc +++ b/db/compaction/compaction_iterator.cc @@ -1105,7 +1105,9 @@ void CompactionIterator::DecideOutputLevel() { TEST_SYNC_POINT_CALLBACK("CompactionIterator::PrepareOutput.context", &context); output_to_penultimate_level_ = context.output_to_penultimate_level; -#endif /* !NDEBUG */ +#else + output_to_penultimate_level_ = false; +#endif // NDEBUG // if the key is newer than the cutoff sequence or within the earliest // snapshot, it should output to the penultimate level.