apollo_committer,apollo_committer_config: warn when block commit exceeds duration threshold - #14888
Conversation
PR SummaryLow Risk Overview After each block commit, revert, or OS witness commit path, block timing stats are still emitted the same way, but total commit duration above the threshold is logged at Tests use Reviewed by Cursor Bugbot for commit b495b93. Bugbot is set up for automated code reviews on this repo. Configure here. |
Stack overview — committer slowdown observability (PR 1 of 4)Observability guardrail for the committer under the os_input rollout: makes a slow committer loud, measurable, and diagnosable — before it lags the N‑10 retrospective‑hash gate and risks a consensus freeze.
Metric added
Alerts added
The lag alert computes lag per node (each committer vs its own consensus height) and gates out observer nodes ( Panels added (dashboard, committer row)
Also in the stack (logs)
|
c9a778b to
7213a58
Compare
4dc351e to
8fc73a6
Compare
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs reviewed 8 files and all commit messages, and made 6 comments.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on itamar-starkware).
crates/apollo_committer/src/committer.rs line 797 at r1 (raw file):
// A slow committer eventually stalls consensus (proposer waits on the N-10 hash). let warn_threshold_millis = block_commit_duration_warn_threshold.as_secs_f64() * 1000.0; if durations.block * 1000.0 > warn_threshold_millis {
Works?
Suggestion:
if Duration::from_secs_f64(durations.block) > block_commit_duration_warn_threshold {crates/apollo_committer/src/committer.rs line 798 at r1 (raw file):
let warn_threshold_millis = block_commit_duration_warn_threshold.as_secs_f64() * 1000.0; if durations.block * 1000.0 > warn_threshold_millis { warn!("{stats}, above the {warn_threshold_millis:.0} ms warn threshold");
It's not clear what metric is above the threshold.
Code quote:
warn!("{stats}, above thecrates/apollo_committer_config/src/config.rs line 39 at r1 (raw file):
deserialize_with = "deserialize_milliseconds_to_duration", serialize_with = "serialize_duration_as_milliseconds" )]
Do we support such backward compatibility?
Code quote:
// Deployed nodes load config with schema defaults ignored, so absent params must still
// deserialize; `default` keeps configs that predate this field loadable.
#[serde(
default = "default_block_commit_duration_warn_threshold",
deserialize_with = "deserialize_milliseconds_to_duration",
serialize_with = "serialize_duration_as_milliseconds"
)]crates/apollo_committer_config/src/config.rs line 40 at r1 (raw file):
serialize_with = "serialize_duration_as_milliseconds" )] pub block_commit_duration_warn_threshold_millis: Duration,
Can you shorten the field name?
Code quote:
block_commit_duration_warn_threshold_milliscrates/apollo_committer_config/src/config.rs line 45 at r1 (raw file):
fn default_block_commit_duration_warn_threshold() -> Duration { Duration::from_millis(3000) }
Define a constant instead of a function.
Code quote:
fn default_block_commit_duration_warn_threshold() -> Duration {
Duration::from_millis(3000)
}crates/apollo_committer_config/src/config_test.rs line 3 at r1 (raw file):
use super::{default_block_commit_duration_warn_threshold, ApolloCommitterConfig}; /// A deployed node loads config with schema defaults ignored, so a preset that predates
Do we support such backward compatibility?
8fc73a6 to
9df2eae
Compare
|
Previously, yoavGrs wrote…
Yes, done |
|
Previously, yoavGrs wrote…
Added more words here. |
|
Previously, yoavGrs wrote…
Yes, it's the point here. We want to be able to support missing config. |
|
Previously, yoavGrs wrote…
Done |
|
Previously, yoavGrs wrote…
Function as input is a constraint of serde default. Anyway I added a const inside. |
|
Previously, yoavGrs wrote…
Yes, it's the point here. We want to be able to support missing config. |
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs reviewed 4 files and all commit messages, made 3 comments, and resolved 3 discussions.
Reviewable status: 7 of 8 files reviewed, 4 unresolved discussions (waiting on itamar-starkware).
crates/apollo_committer_config/src/config.rs line 39 at r1 (raw file):
Previously, itamar-starkware wrote…
Yes, it's the point here. We want to be able to support missing config.
The updated node will start with the updated config. When may the field be missed?
crates/apollo_committer/src/committer.rs line 800 at r2 (raw file):
warn!("{stats}, block commit duration above the {threshold_millis} ms warn threshold"); } else { debug!("{stats}, block commit duration within the {threshold_millis} ms warn threshold");
Consider removing it.
Code quote:
, block commit duration within the {threshold_millis} ms warn thresholdcrates/apollo_committer_config/src/config.rs line 42 at r2 (raw file):
} pub const DEFAULT_COMMIT_DURATION_WARN_THRESHOLD: Duration = Duration::from_millis(3000);
consts at the top of the file.
9df2eae to
40afe90
Compare
…eds duration threshold
40afe90 to
b495b93
Compare
itamar-starkware
left a comment
There was a problem hiding this comment.
@itamar-starkware made 3 comments.
Reviewable status: 3 of 10 files reviewed, 4 unresolved discussions (waiting on yoavGrs).
crates/apollo_committer/src/committer.rs line 800 at r2 (raw file):
Previously, yoavGrs wrote…
Consider removing it.
Done.
crates/apollo_committer_config/src/config.rs line 39 at r1 (raw file):
Previously, yoavGrs wrote…
The updated node will start with the updated config. When may the field be missed?
It was a fallback. But I compared the behavior of other configs and I understand we don't support such fallbacks. We want node to panic if the configmap has missing field.
I changed some of the code in this PR accordingly.
crates/apollo_committer_config/src/config.rs line 42 at r2 (raw file):
Previously, yoavGrs wrote…
consts at the top of the file.
Done.
yoavGrs
left a comment
There was a problem hiding this comment.
@yoavGrs reviewed 7 files and all commit messages, made 1 comment, and resolved 4 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on itamar-starkware).
|
Security scan complete — no issues detected. Generated by Claude Code |

No description provided.