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
When the state of an aggregate has changed, "uncommitted" events are generated. These events are fetched from the aggregate when saving and the list of uncommitted events is emptied. If an error occurs when saving and a rollback occurs, then the "uncommitted" events are lost. However, the state of the aggregate has remained. If you then change the aggregate again, an "uncommittet" event is generated again, which can then be saved. The problem here is that the event/change was created based on the state, which is now not saved. The events in between are missing. This also means that the state is invalid in the case of a rebuild.
The question now is, what can we improve so that something like this doesn't happen?
The text was updated successfully, but these errors were encountered:
The repository has been made stateless so that the aggregate can be fetched again. And change the saving of the snapshot to ensure that only snapshots of persistated data/events are created.
When the state of an aggregate has changed, "uncommitted" events are generated. These events are fetched from the aggregate when saving and the list of uncommitted events is emptied. If an error occurs when saving and a rollback occurs, then the "uncommitted" events are lost. However, the state of the aggregate has remained. If you then change the aggregate again, an "uncommittet" event is generated again, which can then be saved. The problem here is that the event/change was created based on the state, which is now not saved. The events in between are missing. This also means that the state is invalid in the case of a rebuild.
The question now is, what can we improve so that something like this doesn't happen?
The text was updated successfully, but these errors were encountered: