Skip to content

Commit 27f64b5

Browse files
committed
Remove maximum sacle up factor
1 parent 998093a commit 27f64b5

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

quickwit/quickwit-common/src/shared_consts.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,8 @@ pub const DEFAULT_SHARD_THROUGHPUT_LIMIT: ByteSize = ByteSize::mib(5);
7272
/// Large enough to absorb small bursts but should remain defensive against unbalanced shards
7373
pub const DEFAULT_SHARD_BURST_LIMIT: ByteSize = ByteSize::mib(50);
7474

75-
/// Maximum factor that avoids oscillating between scale up and scale down
76-
pub const MAX_SHARD_SCALE_UP_FACTOR: f32 = 2.0;
77-
/// A high value to allow quick scale up by default
75+
/// A compromise between "exponential" scale up and moderate shard count increase.
7876
pub const DEFAULT_SHARD_SCALE_UP_FACTOR: f32 = 1.5;
79-
const _: () = assert!(DEFAULT_SHARD_SCALE_UP_FACTOR < MAX_SHARD_SCALE_UP_FACTOR);
8077

8178
// (Just a reexport).
8279
pub use bytesize::MIB;

quickwit/quickwit-config/src/node_config/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use http::HeaderMap;
2727
use quickwit_common::net::HostAddr;
2828
use quickwit_common::shared_consts::{
2929
DEFAULT_SHARD_BURST_LIMIT, DEFAULT_SHARD_SCALE_UP_FACTOR, DEFAULT_SHARD_THROUGHPUT_LIMIT,
30-
MAX_SHARD_SCALE_UP_FACTOR,
3130
};
3231
use quickwit_common::uri::Uri;
3332
use quickwit_proto::indexing::CpuCapacity;
@@ -355,6 +354,9 @@ pub struct IngestApiConfig {
355354
/// (hidden) Targeted throughput for each shard
356355
pub shard_burst_limit: ByteSize,
357356
/// (hidden) new_shard_count = ceil(old_shard_count * shard_scaling_factor)
357+
///
358+
/// Setting this too high will be cancelled out by the arbiter that prevents
359+
/// creating too many shards at once.
358360
pub shard_scale_up_factor: f32,
359361
}
360362

@@ -429,11 +431,9 @@ impl IngestApiConfig {
429431
estimated_persist_size,
430432
);
431433
ensure!(
432-
self.shard_scale_up_factor > 1.0
433-
&& self.shard_scale_up_factor <= MAX_SHARD_SCALE_UP_FACTOR,
434-
"shard_scale_up_factor ({:?}) must be in the (1,{}) interval",
434+
self.shard_scale_up_factor > 1.0,
435+
"shard_scale_up_factor ({:?}) must be greater than 1",
435436
self.shard_scale_up_factor,
436-
MAX_SHARD_SCALE_UP_FACTOR,
437437
);
438438
Ok(())
439439
}

0 commit comments

Comments
 (0)