Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-100357

Make ReshardingCoordinatorService use async rpc to send commands to donors when performing verification

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • Cluster Scalability 2025-02-17

      SERVER-98581 introduced a helper for sending aggregate command to donor shards to get the number of documents to copy. The helper sends the aggregate command via the ShardRemote, which is an anti-pattern since the rest of the ReshardingCoordinatorService sends commands to donors and recipients via the ReshardingCoordinatorExternalState::sendCommandsToShards (i.e. sharding_ddl_util::sendAuthenticatedCommandToShards) which uses async_rpc::sendCommand and sends the commands in parallel.

      We should make the helper use ReshardingCoordinatorExternalState::sendCommandsToShards, which does support retries. It currently doesn't custom readPreference (it is always set to primaryOnly) and doesn't support attaching shardVersion but that can be changed. 

      As part of this, we should refactor the helper to allow SERVER-100358 to re-use some of the code in there.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: