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
#178 made me realize that the MongoDB event store already creates a unique index for "aggregateName" + "aggregateId" + "aggregateVersion". So I'm not sure why I implemented the consistency check using a separate state collection. The index should already ensure optimistic concurrency for aggregates, so I think the additional check can be removed.
Note: The event store must still return a VersionError if the insertion fails because of the index violation.
The text was updated successfully, but these errors were encountered:
#178 made me realize that the MongoDB event store already creates a unique index for
"aggregateName" + "aggregateId" + "aggregateVersion"
. So I'm not sure why I implemented the consistency check using a separate state collection. The index should already ensure optimistic concurrency for aggregates, so I think the additional check can be removed.Note: The event store must still return a
VersionError
if the insertion fails because of the index violation.The text was updated successfully, but these errors were encountered: