Skip to content

Commit

Permalink
storcon: allow for more concurrency in drain/fill operations
Browse files Browse the repository at this point in the history
  • Loading branch information
VladLazar committed Dec 11, 2024
1 parent e4bb1ca commit 0685b44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion storage_controller/src/background_node_operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{borrow::Cow, fmt::Debug, fmt::Display};
use tokio_util::sync::CancellationToken;
use utils::id::NodeId;

pub(crate) const MAX_RECONCILES_PER_OPERATION: usize = 32;
pub(crate) const MAX_RECONCILES_PER_OPERATION: usize = 64;

#[derive(Copy, Clone)]
pub(crate) struct Drain {
Expand Down
6 changes: 4 additions & 2 deletions storage_controller/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ use crate::{

use context_iterator::TenantShardContextIterator;

const WAITER_FILL_DRAIN_POLL_TIMEOUT: Duration = Duration::from_millis(500);

// For operations that should be quick, like attaching a new tenant
const SHORT_RECONCILE_TIMEOUT: Duration = Duration::from_secs(5);

Expand Down Expand Up @@ -6728,7 +6730,7 @@ impl Service {
}

waiters = self
.await_waiters_remainder(waiters, SHORT_RECONCILE_TIMEOUT)
.await_waiters_remainder(waiters, WAITER_FILL_DRAIN_POLL_TIMEOUT)
.await;

failpoint_support::sleep_millis_async!("sleepy-drain-loop", &cancel);
Expand Down Expand Up @@ -6981,7 +6983,7 @@ impl Service {
}

waiters = self
.await_waiters_remainder(waiters, SHORT_RECONCILE_TIMEOUT)
.await_waiters_remainder(waiters, WAITER_FILL_DRAIN_POLL_TIMEOUT)
.await;
}

Expand Down

0 comments on commit 0685b44

Please sign in to comment.