-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Try to limit forwarding when a grain activation throws an exception in OnActivateAsync() #6891
Try to limit forwarding when a grain activation throws an exception in OnActivateAsync() #6891
Conversation
/// <summary> | ||
/// Remove all expired value from the LRU instance. | ||
/// </summary> | ||
public void RemoveExpired() |
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.
Is this only called from test code?
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.
No, I forgot a commit :) I just call it when we delete idle activations
Looks like there are some tests which need fixing (wrong exception type), which is a good sign :) |
…tion during activation collection
/azp run Azure DevOps - Functional |
Azure Pipelines successfully started running 1 pipeline(s). |
…n OnActivateAsync() (dotnet#6891)
The goal of this PR is to reduce the occurrence of forwarding failure because a grain cannot be activated due to a failure in
OnActivateAsync()
.When a grain has no activation, it's possible that multiple silos will try to create multiple activations for the same grain identity at the same time. But only one activation will win the race, and all other silos will then forward the requests to the winning activation.
If this winning activation throws during
OnActivateAsync()
, it might trigger another potential race for activation creation, and additional forwarding. As a result, the user might see several "Forwarding failed" exceptions instead of the exception that was thrown during the activation process.