Remove waiting for change stream monitor in the recipient critical section

XMLWordPrintableJSON

    • Type: Sub-task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The recipient service today waits for the change stream to monitor while holding critical section here.

      In order to not make resharding validation cause the critical section to timeout, we should change it so that it can perform the validation-related work post commit.

      The coordinator today uses the ShardsvrReshardingDonorFetchFinalCollectionStatsCommand to obtain the values from the donor, while the recipients update the document in the config server directly (via ReshardingRecipientService::RecipientStateMachine::_updateCoordinator using info stored in _recipientCtx). We should try to make it such that both donor and recipients use the same method for consistency by using commands. It also has an added benefit for the validation post commit logic because it wil be easier for coordinator to know if something went wrong in the recipient if the new command returns an error vs coordinator waiting for a long time for recipient to update the fields.

      Together with SERVER-125432, coordinator will be able to retrieve data needed to perform resharding validation post-commit and outside the critical section.

            Assignee:
            Unassigned
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: