We are using protobuf for few years now and it great for what we do.
However, lately we are experiencing few de-serialisation issue.
Previously deserialisation was done serially, now to speed up the process we have used all cores system can provide.
Scenario:
Note: 1st and 2nd deserialisation happens a few milliseconds apart.
Error:
Context: 1 errors generating widgets. AnalysisTaskGlobalID: d549f367-f42f-45fa-b230-f2839a6fefe6 Error: Exception of type 'ProtoBuf.ProtoException' was thrown. Stack: at ProtoBuf.ProtoReader.StartSubItem(ProtoReader reader) in c:\Dev\protobuf-net\protobuf-net\ProtoReader.cs:line 599 at ProtoBuf.ProtoReader.ReadTypedObject(Object value, Int32 key, ProtoReader reader, Type type) in c:\Dev\protobuf-net\protobuf-net\ProtoReader.cs:line 531 at proto_2(Object , ProtoReader ) at ProtoBuf.Meta.TypeModel.Deserialize(Stream source, Object value, Type type, SerializationContext context) in c:\Dev\protobuf-net\protobuf-net\Meta\TypeModel.cs:line 506 at ProtoBuf.Serializer.Deserialize[T](Stream source) in c:\Dev\protobuf-net\protobuf-net\Serializer.cs:line 69
We don't think its a multi threading issue!, as we tried synchronizing de-serialisation process.
However, when adding a sleep of 1000ms before de-serialisation, works most of the time!
Any thoughts on this, please let me know.
This at in the end was not a protobuf error. Our application was not sufficiently synchronized.