[SERVER-50921] Handle checking whether recipients should be added to oplog entries even after recovery Created: 14/Sep/20  Updated: 29/Oct/23  Resolved: 17/Nov/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Vishnu Kaushik
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-lifecycle, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49821 Define utility function for getting r... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-11-02, Sharding 2020-11-16, Sharding 2020-11-30
Participants:

 Description   

What needs to be done:

  1. 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?
  2. 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.
  3. Call this new method from getDestinedRecipient(), replacing the current call to getDonorFields().
  4. Figure out tests that are related to this functionality and mock scenarios to verify that the above state constraints are properly met.


 Comments   
Comment by Githook User [ 17/Nov/20 ]

Author:

{'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}

Message: SERVER-50921 add method to return reshard key if appending resharding recipients to oplog
Branch: master
https://github.com/mongodb/mongo/commit/44f2e1e43abeb6777f22635b6a0020beb06f7ad9

Generated at Thu Feb 08 05:24:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.