diff --git a/schema.hh b/schema.hh index da2b57451b..14c61fde51 100644 --- a/schema.hh +++ b/schema.hh @@ -279,6 +279,7 @@ bool operator==(const column_definition&, const column_definition&); static constexpr int DEFAULT_MIN_COMPACTION_THRESHOLD = 4; static constexpr int DEFAULT_MAX_COMPACTION_THRESHOLD = 32; +static constexpr int DEFAULT_MIN_INDEX_INTERVAL = 128; class column_mapping_entry { bytes _name; @@ -358,7 +359,7 @@ private: double _read_repair_chance = 0.0; int32_t _min_compaction_threshold = DEFAULT_MIN_COMPACTION_THRESHOLD; int32_t _max_compaction_threshold = DEFAULT_MAX_COMPACTION_THRESHOLD; - int32_t _min_index_interval = 128; + int32_t _min_index_interval = DEFAULT_MIN_INDEX_INTERVAL; int32_t _max_index_interval = 2048; int32_t _memtable_flush_period = 0; speculative_retry _speculative_retry = ::speculative_retry(speculative_retry::type::PERCENTILE, 0.99); diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 1423bbd5c4..263d34e73f 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1642,7 +1642,7 @@ future<> sstable::generate_summary(const io_priority_class& pc) { auto estimated_partitions = size / sizeof(uint64_t); // Since we don't have a summary, use a default min_index_interval, and if needed we'll resample // later. - prepare_summary(_summary, estimated_partitions, 0x80); + prepare_summary(_summary, estimated_partitions, DEFAULT_MIN_INDEX_INTERVAL); file_input_stream_options options; options.buffer_size = sstable_buffer_size;