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
Directly propagate OnActivateAsync failures to callers #3315
Directly propagate OnActivateAsync failures to callers #3315
Conversation
The test failure can be ignored. |
RerouteAllQueuedMessages(activation, null, "Failed InvokeActivate", exception); | ||
// Reject all of the messages queued for this activation. | ||
var activationFailedMsg = nameof(Grain.OnActivateAsync) + " failed"; | ||
RejectAllQueuedMessages(activation, activationFailedMsg, exception); |
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.
Isn't there a race here that will allow new requests to get enqueue right after we reject all messages that are already in the queue? Are we preventing enqueuing of new requests before we start the rejection loop?
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.
The activation is already marked as invalid and this is running inside of a lock on the activation. Is there room for a race?
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.
If it's already marked as invalid, then I think we are fine.
Is this change available in 1.5.1 or 1.5.2 (and 1.5.1)? |
No, it's only in master. Will be in 2.0.0-beta. |
Fixes #3213
OnActivateAsync
will be propagated directly back to the caller.IMessagingConfiguration.MaxResendCount
times (default is 0) because the rejection is marked asTransient
.OrleansMessageRejectionException
) which typically contained the original exception'sMessage
in itsMessage
property.