Skip to content

Commit

Permalink
Reverting the change in the shard opening rate limits. (#5197)
Browse files Browse the repository at this point in the history
Reverts 3d6543b
  • Loading branch information
fulmicoton authored Jul 5, 2024
1 parent 43e5ced commit 97889f6
Showing 1 changed file with 4 additions and 11 deletions.
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

0 comments on commit 97889f6

Please sign in to comment.