world-federation-of-advertisers / cross-media-measurement

Apache License 2.0
34 stars 11 forks source link

Avoid failing Measurements at Duchy due to stale ComputationParticipant state #1663

Open SanjayVas opened 3 weeks ago

SanjayVas commented 3 weeks ago

Scenario:

  1. Herald sees a Measurement update that tells it to set participant requisition params. It enqueues that task.
  2. Mill calls SetParticipantRequisitionParams at Kingdom and succeeds.
  3. Mill crashes before completing the write to local DB.

The current behavior is that the Mill will pick up the transient failed task for retry and call SetParticipantRequisitionParams again, failing due to the ComputationParticipant state already having transitioned.

This case need not result in a Measurement failure. There are also similar cases for other ComputationParticipant mutations.

See #1645 for more details.