When multiple requests come in concurrently, it is currently possible for later updates to override previous updates.
While the data within a subsystem is still in a consistent state, expected changes by the client may be omitted. For example, calling RecruitmentService.InviteNewParticipantGroup multiple times can result in one request overriding changes of another competing request.
However, the InviteNewParticipantGroup call specifically has a side effect of sending out invitations. This is a related issue which needs to be accounted for, most likely, by only sending out the invitation on a successful repo update.
When multiple requests come in concurrently, it is currently possible for later updates to override previous updates.
While the data within a subsystem is still in a consistent state, expected changes by the client may be omitted. For example, calling
RecruitmentService.InviteNewParticipantGroup
multiple times can result in one request overriding changes of another competing request.Using optimistic concurrency, a check can be done to verify whether changes are applied to the expected version of the aggregate root. A default retry mechanism is then to simply retry the full request on up-to-date state.
However, the
InviteNewParticipantGroup
call specifically has a side effect of sending out invitations. This is a related issue which needs to be accounted for, most likely, by only sending out the invitation on a successful repo update.