-
Type: Bug
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Sharding
-
ALL
When a state document is deleted, any shared_ptr references to 'this' in the primary only service machinery are destroyed. If the future chain in any primary only service's run method has not finished and the state document for that object has been removed, we'll seg fault and crash. Each service captures 'this' as 'shared_from_this' after the point that it expects that its state doc will be removed, but to protect against seg faulting (and crashing) in the event that a user accidentally deletes a doc or drops the collection entirely we should capture 'this' as 'shared_from_this' for each continuation.