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
Use case: when using an AtLeastOnceDeliveryActor, I'm not using the journal at all - but I do save snapshots of my AtLeastOnceDelivery state regularly.
When I receive a SaveSnapshotSuccess message, I call:
Command<SaveSnapshotSuccess>(saved =>
{
var seqNo = saved.Metadata.SequenceNr;
DeleteMessages(seqNo);
DeleteSnapshots(new SnapshotSelectionCriteria(seqNo,
saved.Metadata.Timestamp.AddMilliseconds(-1))); // delete all but the most current snapshot
});
Out of a force of habit from my other actors that use Akka.Persistence.
The DeleteMessages call in this case causes a SqlException to be raised in the Metadata table used by the Akka.Persistence.Sql.Common driver, due to this line in the driver:
Since the sequence numbers are both 0, the driver tries to insert another (persistenceId, 0) record into the Metadata table even though one already exists.
I'll send a repo along for this shortly.
The text was updated successfully, but these errors were encountered:
Version: Akka.NET v1.3.11
Use case: when using an
AtLeastOnceDeliveryActor
, I'm not using the journal at all - but I do save snapshots of myAtLeastOnceDelivery
state regularly.When I receive a
SaveSnapshotSuccess
message, I call:Out of a force of habit from my other actors that use Akka.Persistence.
The
DeleteMessages
call in this case causes aSqlException
to be raised in theMetadata
table used by the Akka.Persistence.Sql.Common driver, due to this line in the driver:akka.net/src/contrib/persistence/Akka.Persistence.Sql.Common/Journal/QueryExecutor.cs
Lines 617 to 629 in 666811c
Since the sequence numbers are both 0, the driver tries to insert another
(persistenceId, 0)
record into the Metadata table even though one already exists.I'll send a repo along for this shortly.
The text was updated successfully, but these errors were encountered: