Skip to content
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(PocketIC): retry topology operation if the instance is busy #2005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rs/pocket_ic_server/src/pocket_ic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,10 @@ impl Operation for GetTopology {
OpOut::Topology(pic.topology().clone())
}

fn retry_if_busy(&self) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who would call that function? I don't understand

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an override of the default implementation of trait function that is called here and the result used here to decide if we return a conflict error (that, e.g., ic-agent cannot handle) or retry (so that ic-agent does not see a conflict error).

true
}

fn id(&self) -> OpId {
OpId("get_topology".into())
}
Expand Down