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

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Oct 11, 2024

Because the PocketIC operation to fetch topology is also expected to be called by IC agents that don't expect to retry the operation if the PocketIC instance is busy, we need to retry in PocketIC.

@mraszyk mraszyk requested a review from a team as a code owner October 11, 2024 15:56
@github-actions github-actions bot added the fix label Oct 11, 2024
@@ -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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants