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

Stateless worker grains don't support reentrancy by predicate #9049

Closed
temcewen opened this issue Jun 29, 2024 · 1 comment · Fixed by #9050
Closed

Stateless worker grains don't support reentrancy by predicate #9049

temcewen opened this issue Jun 29, 2024 · 1 comment · Fixed by #9050

Comments

@temcewen
Copy link

You can't add the [MayInterleave] attribute to a grain that also has the [StatelessWorker] attribute. Doing so results in the following exception (with stack trace):

Message: 
System.ArgumentException : Cannot set a component on a StatelessWorkerGrainContext

 Stack Trace: 
StatelessWorkerGrainContext.SetComponent[TComponent](TComponent instance) line 114
MayInterleaveConfigurator.Configure(IGrainContext context) line 415
GrainContextActivator.CreateInstance(GrainAddress address) line 62
Catalog.GetOrCreateActivation(GrainId& grainId, Dictionary`2 requestContextData, MigrationContext rehydrationContext) line 265
MessageCenter.ReceiveMessage(Message msg) line 518

The docs don't specify this isn't a possible combination of features:
MayInterleave docs
StatelessWorker grain docs

Either way, I don't know why stateless worker grains wouldn't be able to have reentrancy using predicates by design. It seems like a valid use case for a stateless worker grain to determine reentrancy by a RequestContext property or something like that?

@ReubenBond
Copy link
Member

ReubenBond commented Jul 1, 2024

Fixed by #9050

@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants