sstables: get rid of magic number

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
Message-Id: <c0b3acf58aa6f7632bf15a2dd0dcac4d1b45d444.1469389290.git.raphaelsc@scylladb.com>
This commit is contained in:
Raphael S. Carvalho
2016-07-24 16:42:39 -03:00
committed by Avi Kivity
parent b5bb702b35
commit 56ef3d4fde
2 changed files with 3 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;