|
UPDATE: The assumption mentioned here is slightly dangerous. In future, if recipient throws `ConflictingServerlessOperation` error after the state doc is persisted, donor could miss sending the recipientForgetMigration which is results in failure to garbage collect state document forever.
I would propose to remove this premature optimization on donor side.
========================
As part of SERVER-65315, we have done some changes to recipient Service.
- The contract is that only on receiving RecipientForgetMigrationCmd from Donor, we would update the recipient state doc as kDone and set the expiryAt field. But, after
SERVER-65315, it seems the contract is broken.
- Reading this piece of code, it gives indication that recipient can inform donor that it has garbage collected without doing it. Technically it's not possible as we can't get error code after this point, but it not really clear to readers. So, I propose to remove this piece of code for more readers clarity.
|