when use not exist grain trace this
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 10.9k
- Forks
- 2.1k
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 351
Description
fail: Orleans.Storage.AdoNetGrainStorage[200416]
Error reading grain state: ServiceId=default ProviderName=store GrainType=state GrainId=1329023981616 ETag=(null).
Newtonsoft.Json.JsonSerializationException: Type specified in JSON 'Grains.MobileGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with 'Grains.PlayerGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Path '$type', line 1, position 51.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Orleans.Serialization.OrleansJsonSerializer.Deserialize(Type expectedType, String input) in /_/src/Orleans.Core/Serialization/OrleansJsonSerializer.cs:line 46
at Orleans.Storage.JsonGrainStorageSerializer.Deserialize[T](BinaryData input) in /_/src/Orleans.Core/Providers/StorageSerializer/JsonGrainStorageSerializer.cs:line 35
at Orleans.Storage.AdoNetGrainStorage.<>c__DisplayClass31_0`1.b__1(IDataRecord selector, Int32 resultSetCount, CancellationToken token) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 269
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.SelectAsync[TResult](DbDataReader reader, Func`4 selector, CancellationToken cancellationToken) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 222
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteReaderAsync[TResult](DbCommand command, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 245
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteAsync[TResult](String query, Action`1 parameterProvider, Func`5 executor, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 283
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ReadAsync[TResult](String query, Action`1 parameterProvider, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 164
at Orleans.Storage.AdoNetGrainStorage.ReadStateAsync[T](String grainType, GrainId grainReference, IGrainState`1 grainState) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 249
fail: Orleans.Storage.AdoNetGrainStorage[102202]
Error from storage provider AdoNetGrainStorage.state during ReadState for grain Type=player Id=13570009830 Error=
Exc level 0: Newtonsoft.Json.JsonSerializationException: Type specified in JSON 'Grains.MobileGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with 'Grains.PlayerGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Path '$type', line 1, position 51.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Orleans.Serialization.OrleansJsonSerializer.Deserialize(Type expectedType, String input) in /_/src/Orleans.Core/Serialization/OrleansJsonSerializer.cs:line 46
at Orleans.Storage.JsonGrainStorageSerializer.Deserialize[T](BinaryData input) in /_/src/Orleans.Core/Providers/StorageSerializer/JsonGrainStorageSerializer.cs:line 35
at Orleans.Storage.AdoNetGrainStorage.<>c__DisplayClass31_0`1.b__1(IDataRecord selector, Int32 resultSetCount, CancellationToken token) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 269
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.SelectAsync[TResult](DbDataReader reader, Func`4 selector, CancellationToken cancellationToken) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 222
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteReaderAsync[TResult](DbCommand command, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 245
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteAsync[TResult](String query, Action`1 parameterProvider, Func`5 executor, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 283
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ReadAsync[TResult](String query, Action`1 parameterProvider, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 164
at Orleans.Storage.AdoNetGrainStorage.ReadStateAsync[T](String grainType, GrainId grainReference, IGrainState`1 grainState) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 249
at Orleans.Core.StateStorageBridge`1.ReadStateAsync() in /_/src/Orleans.Runtime/Storage/StateStorageBridge.cs:line 68
Newtonsoft.Json.JsonSerializationException: Type specified in JSON 'Grains.MobileGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not compatible with 'Grains.PlayerGrainState, share, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Path '$type', line 1, position 51.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Orleans.Serialization.OrleansJsonSerializer.Deserialize(Type expectedType, String input) in /_/src/Orleans.Core/Serialization/OrleansJsonSerializer.cs:line 46
at Orleans.Storage.JsonGrainStorageSerializer.Deserialize[T](BinaryData input) in /_/src/Orleans.Core/Providers/StorageSerializer/JsonGrainStorageSerializer.cs:line 35
at Orleans.Storage.AdoNetGrainStorage.<>c__DisplayClass31_0`1.b__1(IDataRecord selector, Int32 resultSetCount, CancellationToken token) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 269
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.SelectAsync[TResult](DbDataReader reader, Func`4 selector, CancellationToken cancellationToken) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 222
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteReaderAsync[TResult](DbCommand command, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 245
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ExecuteAsync[TResult](String query, Action`1 parameterProvider, Func`5 executor, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 283
at Orleans.Persistence.AdoNet.Storage.RelationalStorage.ReadAsync[TResult](String query, Action`1 parameterProvider, Func`4 selector, CancellationToken cancellationToken, CommandBehavior commandBehavior) in /_/src/AdoNet/Shared/Storage/RelationalStorage.cs:line 164
at Orleans.Storage.AdoNetGrainStorage.ReadStateAsync[T](String grainType, GrainId grainReference, IGrainState`1 grainState) in /_/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorage.cs:line 249
at Orleans.Core.StateStorageBridge`1.ReadStateAsync() in /_/src/Orleans.Runtime/Storage/StateStorageBridge.cs:line 68
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OrleansJsonSerializer.cs at line 46 and AdoNetGrainStorage.cs at lines 249 and 269, using the reported type-mismatch trace as the reproduction context. Trace how the stored state is read for the player grain and determine the expected behavior for incompatible serialized state; the issue text does not define a desired fix or completion test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100