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

Improve ability to test resharding's DonorStateMachine from C++

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Sharding 2021-03-22
    • Story Points:
      2

      Description

      This involves doing the following:

      • Generalizing the PrimaryOnlyServiceTest fixture from primary_only_service_test.cpp.
      • Moving DonorStateMachine methods which access Grid and CatalogCacheLoader behind a DonorStateMachineExternalState interface.
      • Adding a recipientShardIds field to TypeCollectionDonorFields.
        1. Coordinator's transition to kInitializing would do insert to config.reshardingOperations and update to config.collections entry for original namespace to set allowMigrations=false and reshardingFields.uuid and reshardingFields.state. It wouldn't fill in the reshardingFields.donorFields for the original namespace yet.
        2. Coordinator's transition to kPreparingToDonate would do update to config.reshardingOperations, insert to config.collections, config.chunks, and config.tags for temporary resharding namespace, and update to config.collections entry for original namespace to set reshardingFields.donorFields.
      • Updating verifyValidReshardingFields() to (1) correct the xor logic and (2) special case kInitializing to say there should be neither donorFields nor recipientFields.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              max.hirschhorn Max Hirschhorn
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: