Skip to content

Commit

Permalink
Set tentatively good default values in resharding config (#12609)
Browse files Browse the repository at this point in the history
PR to update resharding config to "good" starting values.
  • Loading branch information
Trisfald authored Dec 13, 2024
1 parent 8457044 commit 81728f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/chain-configs/src/client_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,20 @@ pub struct ReshardingConfig {

/// The delay between attempts to start resharding while waiting for the
/// state snapshot to become available.
/// UNUSED in ReshardingV3.
#[serde(with = "near_time::serde_duration_as_std")]
pub retry_delay: Duration,

/// The delay between the resharding request is received and when the actor
/// actually starts working on it. This delay should only be used in tests.
/// UNUSED in ReshardingV3.
#[serde(with = "near_time::serde_duration_as_std")]
pub initial_delay: Duration,

/// The maximum time that the actor will wait for the snapshot to be ready,
/// before starting resharding. Do not wait indefinitely since we want to
/// report error early enough for the node maintainer to have time to recover.
/// UNUSED in ReshardingV3.
#[serde(with = "near_time::serde_duration_as_std")]
pub max_poll_time: Duration,

Expand All @@ -290,14 +293,14 @@ impl Default for ReshardingConfig {
// extra load on the node as possible.
Self {
batch_size: ByteSize::kb(500),
batch_delay: Duration::milliseconds(100),
batch_delay: Duration::milliseconds(5),
retry_delay: Duration::seconds(10),
initial_delay: Duration::seconds(0),
// The snapshot typically is available within a minute from the
// epoch start. Set the default higher in case we need to wait for
// state sync.
max_poll_time: Duration::seconds(2 * 60 * 60), // 2 hours
catch_up_blocks: 50,
catch_up_blocks: 20,
}
}
}
Expand Down

0 comments on commit 81728f3

Please sign in to comment.