-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: give indexer some time to catch up before failing on restart #792
Conversation
@@ -324,7 +328,7 @@ pub fn run( | |||
anyhow::Ok(lake) | |||
}) else { | |||
tracing::error!(?options, "indexer failed to build"); | |||
backoff(i); | |||
backoff(i, 1, 120); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems i will never decrease, and eventually i will become max
if indexer keep working. Do we need to restore it to a small number on a not failing case?
chain-signatures/contract/src/lib.rs
Outdated
@@ -584,6 +584,7 @@ impl VersionedMpcContract { | |||
#[near_bindgen] | |||
impl VersionedMpcContract { | |||
#[handle_result] | |||
#[init(ignore_state)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this change? Not sure if it's safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry. shouldn't have pushed this.
af90fba
to
867eb20
Compare
if i > 0 { | ||
// give it some time to catch up | ||
backoff(i, 10, 300); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could've just had a flat sleep(5mins)
here instead of modifying backoff
No description provided.