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

Do not register IGrainStorage in DI unless there is a provider named "Default" #7409

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Dec 1, 2021

This can cause issues when:

  • Using Autofac
  • Registering storage providers with custom names
  • Not registering a default provider (a provider with the name "Default")

The error which users will see can include an exception with the message: A delegate registered to create instances of 'Orleans.Storage.IGrainStorage' returned null and a stack trace containing GrainVersionStore.OnStart

Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond added this to the 4.0.0 milestone Dec 1, 2021
@benjaminpetit benjaminpetit merged commit c29cc6d into dotnet:main Dec 1, 2021
@ReubenBond ReubenBond deleted the fix/default-grain-persistence-registration branch December 17, 2021 20:50
@ReubenBond ReubenBond added the Needs: backport PRs which should be backported to a (prior) release branch label Dec 17, 2021
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Dec 17, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…"Default" (dotnet#7409)
@ReubenBond ReubenBond removed the Needs: backport PRs which should be backported to a (prior) release branch label Jan 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
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 this pull request may close these issues.

None yet

2 participants