-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeleteMessageFailure fails #3205
Comments
When you're deleting an event journal history, there is a risk of loosing the last value of SequenceNr, which could potentially break a continuous history of your events. If this happens (usually when you clear event journal up to the current event), journal will store the last known SequenceNr for target persistence Id in a separate Metadata table. This looks like a problem with SQL statement for that case, which should be insert or update, but (probably) is only insert right now. |
…ementation also delete the entries in the metadata table. This solves akkadotnet#3205 (violation of primary key constraint when the value already exists) and ensures that there exists at most one entry per PersistenceId value.
…ementation also delete the entries in the metadata table. This solves akkadotnet#3205 (violation of primary key constraint when the value already exists) and ensures that there exists at most one entry per PersistenceId value.
I had the same problem and you are right, the existing update statement does only an insert. The easies solution which works on any SQL database is to delete the entries in metadata with the same where clause used for deleting the journal entries. This fix is implemented in my pull request. |
closed via #3468 |
…ementation also delete the entries in the metadata table. This solves akkadotnet#3205 (violation of primary key constraint when the value already exists) and ensures that there exists at most one entry per PersistenceId value. (akkadotnet#3468)
Sometimes ... I get the following error. Why it is "inserting" on a delete operation ?
The text was updated successfully, but these errors were encountered: