[SERVER-71461] Must preserve the contract that "R updates the state doc as kDone and set the expiryAt field only on receiving RecipientForgetMigrationCmd from Donor " Created: 17/Nov/22  Updated: 27/Mar/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Suganthi Mani Assignee: Suganthi Mani
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Serverless
Operating System: ALL
Participants:

 Description   

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.

  1. 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-65315it seems the contract is broken
  2.  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.


 Comments   
Comment by Steven Vannelli [ 13/Mar/23 ]

Leaving this in triage until suganthi.mani@mongodb.com and didier.nadeau@mongodb.com sync up on how we should proceed. 

Comment by Steven Vannelli [ 21/Nov/22 ]

Putting this toward the top of the backlog until Shard Merge Milestone 3 design is approved. We can start this after that.

Generated at Thu Feb 08 06:19:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.