ReshardingDonorServiceTest should wait for donor to be "donating-initial-data" state before starting the ReshardingChangeStreamsMonitor

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • Cluster Scalability 2025-03-17
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The notifyToStartChangeStreamsMonitor calls ReshardingDonorService::DonorStateMachine::createAndStartChangeStreamsMonitor which uses _cancelableOpCtxFactory. Currently, notifyToStartChangeStreamsMonitor is called immediately after the DonorStateMachine so the _cancelableOpCtxFactory might not have been initialized yet because run() is called asynchronously. This is a test-only issue since in a non-test setup createAndStartChangeStreamsMonitor (i.e. _shardsvrReshardingDonorStartChangStreamsMonitor) is by design called after the donor is already in the "donating-initial-data" state, therefore has already initialized _cancelableOpCtxFactory. 

            Assignee:
            Cheahuychou Mao
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: