Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverting the change in the shard opening rate limits. #5197

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions quickwit/quickwit-control-plane/src/model/shard_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,14 @@ use quickwit_proto::ingest::{Shard, ShardState};
use quickwit_proto::types::{IndexUid, NodeId, ShardId, SourceId, SourceUid};
use tracing::{error, info, warn};

/// Limits the number of shards that can be opened for scaling up a source to 12 per minute.
/// Limits the number of shards that can be opened for scaling up a source to 5 per minute.
const SCALING_UP_RATE_LIMITER_SETTINGS: RateLimiterSettings = RateLimiterSettings {
burst_limit: 12,
burst_limit: 5,
rate_limit: ConstantRate::new(5, Duration::from_secs(60)),
refill_period: Duration::from_secs(5),
refill_period: Duration::from_secs(12),
};

/// Limits the number of shards that can be closed for scaling down a source to 2 per minute.
#[cfg(not(test))]
const SCALING_DOWN_RATE_LIMITER_SETTINGS: RateLimiterSettings = RateLimiterSettings {
burst_limit: 2,
rate_limit: ConstantRate::new(2, Duration::from_secs(60)),
refill_period: Duration::from_secs(30),
};
#[cfg(test)]
/// Limits the number of shards that can be closed for scaling down a source to 1 per minute.
const SCALING_DOWN_RATE_LIMITER_SETTINGS: RateLimiterSettings = RateLimiterSettings {
burst_limit: 1,
rate_limit: ConstantRate::new(1, Duration::from_secs(60)),
Expand Down
Loading