After update to 8.2 version my streams stopped working
szokef opened this issue · 5 comments
I did an update for all the components to latest version 8.2 and all my streams stopped working.
Anybody else encountered this issue ?
I am getting an InvalidOperationException ..
I am still trying to get a view of the string that is trying to parse and has this problem: "Expected ',', actual '['."
System.InvalidOperationException: Encountered unexpected character. Expected ',', actual '['.
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.BufferReader.ThrowUnexpectedCharacter(Char expected, Char actual) in /_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 399
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.BufferReader.ConsumeCharacter(Char assertChar) in /_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 381
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.ParseArraySpecifier(BufferReader& s) in /_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 258
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.ParseInternal(BufferReader& input) in /_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 181
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.ParseInternal(ReadOnlySpan`1& input) in /_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 49
at Orleans.Serialization.TypeSystem.RuntimeTypeNameParser.Parse(String input) in @/_/src/Orleans.Serialization/TypeSystem/RuntimeTypeNameParser.cs:line 36
at Orleans.Serialization.TypeSystem.TypeConverter.ParseInternal(String formatted, Type& type) in /_/src/Orleans.Serialization/TypeSystem/TypeConverter.cs:line 309
at Orleans.Serialization.TypeSystem.TypeConverter.TryParse(String formatted, Type& result) in /_/src/Orleans.Serialization/TypeSystem/TypeConverter.cs:line 261
at Orleans.Serialization.TypeSystem.TypeCodec.TryRead[TInput](Reader`1& reader) in /_/src/Orleans.Serialization/TypeSystem/TypeCodec.cs:line 112
at Orleans.Serialization.Codecs.FieldHeaderCodec.ReadType[TInput](Reader`1& reader, SchemaType schemaType) in /_/src/Orleans.Serialization/Buffers/Writer.FieldHeader.cs:line 180
at Orleans.Serialization.Codecs.FieldHeaderCodec.ReadExtendedFieldHeader[TInput](Reader`1& reader, Field& field) in /_/src/Orleans.Serialization/Buffers/Writer.FieldHeader.cs:line 163
at Orleans.Serialization.Codecs.ListCodec`1.ReadValue[TInput](Reader`1& reader, Field field) in /_/src/Orleans.Serialization/Codecs/ListCodec.cs:line 64
at Orleans.Serialization.ServiceCollectionExtensions.FieldCodecHolder`1.ReadValue[TInput](Reader`1& reader, Field field) in /_/src/Orleans.Serialization/Hosting/ServiceCollectionExtensions.cs:line 150
at Orleans.Serialization.Serializer`1.Deserialize(ReadOnlySpan`1 source) in /_/src/Orleans.Serialization/Serializer.cs:line 860
at Orleans.Serialization.Serializer`1.Deserialize(Byte[] source) in /_/src/Orleans.Serialization/Serializer.cs:line 884
at Orleans.Providers.DefaultMemoryMessageBodySerializer.Deserialize(ArraySegment`1 bodyBytes) in /_/src/Orleans.Streaming/MemoryStreams/MemoryMessageBody.cs:line 58
at Orleans.Providers.MemoryBatchContainer`1.Payload() in /_/src/Orleans.Streaming/MemoryStreams/MemoryBatchContainer.cs:line 34
at Orleans.Providers.MemoryBatchContainer`1.ImportRequestContext() in /_/src/Orleans.Streaming/MemoryStreams/MemoryBatchContainer.cs:line 51
at Orleans.Streams.PersistentStreamPullingAgent.ContextualizedDeliverBatchToConsumer(StreamConsumerData consumerData, IBatchContainer batch) in /_/src/Orleans.Streaming/PersistentStreams/PersistentStreamPullingAgent.cs:line 710
at Orleans.Streams.PersistentStreamPullingAgent.DeliverBatchToConsumer(StreamConsumerData consumerData, IBatchContainer batch) in /_/src/Orleans.Streaming/PersistentStreams/PersistentStreamPullingAgent.cs:line 694
Orleans.Streams.ProjectEvents: Warning: Failed to deliver message to consumer on cc765244-1a2f-2c58-0d00-0000457a8791 for stream ProjectEvents/PartnerEvents/5dc601b46d0c441694941d4e41beb455, may retry.
@szokef thanks for reporting. Can you share more about the message type which is being sent on these streams? I see it's tripping up trying to read elements within a list. That might be your message type, something nested within, or infrastructure. Could you confirm that all of your hosts were upgraded at the same time, or was this encountered during a rolling deployment / mixed version cluster?
HI @ReubenBond
Thank you for the reply. Here is a screen shot with the message that is passed to the scream and the content.
The classes are based on some generic definitions. If it is need it, I can add the classes too.
I tried to simplify the messages and removed everything except the ID field and still the same behavior.
This is a simple app that I am using it inhouse for my business, I have just one local cluster.
Here are the class definitions in case I missed something:
[GenerateSerializer]
[Alias("Core.EventNotification")]
public class EventNotification<TStateID>
{
[Id(0)] public TStateID? ID { get; set; } = default;
[Id(1)] public DomainEventBase? Event { get; set; } = null;
[Id(2)] public string EventName { get; set; } = string.Empty;
[Id(3)] public int ETag { get; set; } = 0;
}
[GenerateSerializer]
[Alias("Amazon.Orleans.Partners.Events.PartnerCreatedEvent")]
public record class PartnerCreatedEvent : DomainEventBase<Guid>
{
public PartnerCreatedEvent(Guid id) : base(id)
{ }
[Id(0)] public string PartnerName { get; set; } = string.Empty;
}
[GenerateSerializer]
[Alias("Core.DomainEventBase")]
public record class DomainEventBase<TStateID>
{
public DomainEventBase(TStateID id) => ID = id;
public static readonly int NEW_ETAG = -1;
[Id(0)] public DateTimeOffset Timestamp = DateTimeOffset.Now;
[Id(1)] public int ETag { get; set; } = NEW_ETAG;
[Id(2)] public TStateID ID { get; set; } = default;
}
HI @ReubenBond
I did a little more investigation here. The string that is trying to parse is "Core.EventNotification[[Guid]]" and is the second open square bracket "[" that will throw the exception. The variable "Index" has the value 23.
As you can see in the previous message the Type "Event Notification" is a generic with the parameter of type "Guid"
@szokef ah, this is an unfortunate papercut which we should fix... the aliases on your types need to include the generic arity, so
[Alias("Core.DomainEventBase")]
should be [Alias("Core.DomainEventBase`1")]
. Note the `1
, corresponding to 1 generic parameter on the type DomainEventBase<TStateID>
@ReubenBond , yes that did it. Thank you so much for your help.