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 have a grain storage class that contains properties like this:
public bool PublicProp
{
get { return backingField!.Value; }
set { backingField = value; }
}
internal bool? backingField;
When PublicProp is set to false and using the default storage serializer (Newtonsoft) without changing any serializer settings the value will not be written to any storage.
When reactivating the grain with this value using azure table storage, everything works fine. But when using Memory storage it throws:
System.InvalidOperationException: Nullable object must have a value.
at System.Nullable`1.get_Value()
at MyState.get_PublicProp() in /MyState.cs:line 84
at Method(MethodInput input) in /MyGrain.cs:line 38
at Orleans.Runtime.TaskRequest`1.Invoke() in /_/src/Orleans.Core.Abstractions/Runtime/GrainReference.cs:line 703
--- End of stack trace from previous location ---
at Orleans.Serialization.Invocation.ResponseCompletionSource`1.GetResult(Int16 token) in /_/src/Orleans.Serialization/Invocation/ResponseCompletionSource.cs:line 227
at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
I have tried to find the answer to this myself by looking at the different implementations without luck.
What is the difference between using memory grain storage and azure table storage when it comes to serialization?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have a grain storage class that contains properties like this:
When
PublicPropis set tofalseand using the default storage serializer (Newtonsoft) without changing any serializer settings the value will not be written to any storage.When reactivating the grain with this value using azure table storage, everything works fine. But when using Memory storage it throws:
I have tried to find the answer to this myself by looking at the different implementations without luck.
What is the difference between using memory grain storage and azure table storage when it comes to serialization?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions