-
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
Error using CustomLogConsistencyProvider standalone #8157
Comments
Snap! I get same bug too. P.S. Thanks for the workaround. |
Same here |
The |
The issue is still relevant in the 7.1.0 version of the package.
|
…roviders (fixes #8157) (#8677) Co-authored-by: Tim Potze <[email protected]> Co-authored-by: Reuben Bond <[email protected]>
After upgrading from Orleans 3.5 to 7.0, the
CustomLogConsistencyProvider
failes with an exception. Maybe I am missing something, but to me it seems like a bug.I tracked down the issue in the code and here is what I found out:
Reproduce:
AddCustomStorageBasedLogConsistencyProvider
, viaOrleans.Hosting.CustomStorageSiloBuilderExtensions
Result: An exception is thrown
'No service for type 'Orleans.Factory`2[Orleans.Runtime.IGrainContext,Orleans.EventSourcing.ILogConsistencyProtocolServices]' has been registered.'
Suspected reason:
The
ILogConsistencyProtocolServices
are not registered to the di-container insideAddCustomStorageBasedLogConsistencyProvider
. When looking at the other providers, it IS registered insideAddLogStorageBasedLogConsistencyProvider
.I found 1 test, using that methods via
Tests.GeoClusterTests.SiloBuilderConfigurator
. In there, multiple providers are configured, including the storage-based one, that adds theILogConsistencyProtocolServices
to the di-container. So if we add both providers it works, but withCustomLogConsistencyProvider
alone it doesn't.Suggested solution:
Add the following lines to
Orleans.Hosting.CustomStorageSiloBuilderExtensions
, line 36:Workaround:
ProtocolServices
is internal, you have to copy the class to your code and use that version, inside (1)The text was updated successfully, but these errors were encountered: