Closed ia64mail closed 6 years ago
I have tested the my persistent actor with In-memory
journal/snapshot plugin and everything works just fine.
The in-memory journal does not use serialization, that why it works well.
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
I guess you have a mutable Dictionary
inside your models
That was my very first thought. But my TJob
doesn't have any enumerable properties
[DataContract]
public class SomeJob
{
public override string Type => typeof(SomeJob).ToString();
[DataMember]
public virtual long UserId { get; private set; }
[DataMember]
public virtual long PrincipalId { get; private set; }
[DataMember]
public virtual Guid Id { get; private set; }
}
I will try to simulate that situation with some test later on. Quite a busy for now.
@ia64mail Try to check this behavior with a different serializer.
@alexvaluyskiy You are right! I've specified JSON serializer and everything works fine!
serializers {
json = "Akka.Serialization.NewtonSoftJsonSerializer, Akka"
wire = "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"
}
serialization-bindings {
"System.Object" = wire
"Akka.Persistence.IPersistentRepresentation, Akka.Persistence" = json
"Akka.Persistence.SelectedSnapshot, Akka.Persistence" = json
}
And my original configuration was
serializers {
wire = "Akka.Serialization.HyperionSerializer, Akka.Serialization.Hyperion"
}
serialization-bindings {
"System.Object" = wire
}
Ups, I've closed the issue accidentally.
I figured out the cause of the issue. @alexvaluyskiy was right regarding mutable dictionary. The fault tolerant behavior of the Json serializer just pointed me to wrong direction.
My apologize for such false alarm.
Hi there, I faced with random exception under highly loaded persistent actor.
Used packages versions are:
In my scenario I have routine workflow that persists objects to the journal and every 100 records creates a snapshot and cleans up journal and previous snapshot
And regular logs looks like
The actual moment of the "Persistense failed" may vary from test to test and some times could be after
Going to SaveSnapshot
message.The message rate during the tests is about 60/s. Redis runs on local machine.