|
I think there is an underlying problem here that extends to both recipient/donorStateMachines: * Both state machines must handle that the coordinator may report an error before their Resharding<Recipient/Donor>Document has been created locally or their Resharding<Recipient/Donor>Document has been persisted locally.
eg): * Donor is in preparing-to-donate
- reports an state DonorStateEnum::kError because there is an indexBuild in progress
- Coordinator transitions to CoordinatorStateEnum::kError
- At this point, the ReshardingRecipientMachine hasn’t been created, let alone has the ReshardingRecipientDocument been persisted locally.
- Right now, if the ReshardingRecipientMachine doesn’t exist, we return
- For recovery purposes, we probably want to persist that it has seen the error form the coordinator.
- We need to ensure the error gets set after the original ReshardingRecipientDocument is inserted locally
|