OrleansContrib / SignalR.Orleans

SignalR backend based on Orleans.
MIT License
295 stars 64 forks source link

Add persistent state name in ServerDirectoryGrain #145

Closed EdoardoTona closed 1 year ago

EdoardoTona commented 1 year ago

The first parameter of PersistentStateAttribute is the stateName, the second is the storageName and it's optional.

In ServerDirectoryGrain there was only one parameter (Constants.STORAGE_PROVIDER), used as stateName (a mistake since the Constants.STORAGE_PROVIDER is the storageName).

With the storageName empty the default storage isused. If there isn't a default storage configured an exception is throwed:

Orleans.Storage.BadGrainStorageConfigException: No default storage provider found loading grain type SignalR.Orleans.Core.ServerDirectoryGrain.

If the silo was configured with AddMemoryGrainStorageAsDefault() or another default storage, this is used and no exception is throwed.

This PR add a proper stateName in order to use Constants.STORAGE_PROVIDER as storage.

EdoardoTona commented 1 year ago

already fixed in v7