|
What needs to be done:
- Create a method in the ScopedCollectionDescription class named something along the lines of shouldAppendReshardingRecipientOplogEntryForWrite that will return a bool. It will contain this logic (up to you to assess – should it also contain the logic in documentBelongsToMe(), or should documentBelongsToMe() be a separate call inside of getDestinedRecipient?
- Also pull into this method the check that the coordinator state is >= preparingToDonate and < mirroring. This can be done by inspecting the ScopedCollectionDescription's reshardingFields.
- Call this new method from getDestinedRecipient(), replacing the current call to getDonorFields().
- Figure out tests that are related to this functionality and mock scenarios to verify that the above state constraints are properly met.
|