You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing a challenge that I struggle to overcome.
I have implemented a custom storage provider, using an underlying data store that requires all documents being saved to have an Id property.
Since I use external libraries also using Orleans to persist state, I have added logic so that if the State type has an id field it is stored as is, otherwise, the state is wrapped in a generic wrapper type looking like the below:
typeGrainStateWrapper<'T>={ Id:string; State:'T }
Apparently, internally Orleans uses the PubSubGrainState as part of the streaming feature. Since this type does not have an Id property I need to wrap it, however I am getting a runtime issue when persisting the wrapper because the type is inaccessible as it is indeed marked as internal.
This also creates issues because the storage library I am using relies on a fluent API to discover and configure the types being persisted, but once again since the type is internal I cannot do that. I do not understand why a type needing to be persisted would be marked as internal.
Anyway, I wonder what my options are, as it doesn't look like I can easily swap the PubSubGrainState for another type.
Any idea would be greatly appreciated!
Thanks
The text was updated successfully, but these errors were encountered:
I am facing a challenge that I struggle to overcome.
I have implemented a custom storage provider, using an underlying data store that requires all documents being saved to have an Id property.
Since I use external libraries also using Orleans to persist state, I have added logic so that if the State type has an id field it is stored as is, otherwise, the state is wrapped in a generic wrapper type looking like the below:
Apparently, internally Orleans uses the
PubSubGrainState
as part of the streaming feature. Since this type does not have an Id property I need to wrap it, however I am getting a runtime issue when persisting the wrapper because the type is inaccessible as it is indeed marked as internal.This also creates issues because the storage library I am using relies on a fluent API to discover and configure the types being persisted, but once again since the type is internal I cannot do that. I do not understand why a type needing to be persisted would be marked as internal.
Anyway, I wonder what my options are, as it doesn't look like I can easily swap the PubSubGrainState for another type.
Any idea would be greatly appreciated!
Thanks
The text was updated successfully, but these errors were encountered: