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

Add unit tests to verify that ReshardingChangeStreamsMonitor sets the expected $changeStream options

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

      The $changeStream stage in the aggregate command run by the ReshardingChangeStreamsMonitor is configured as follows:

      • When monitoring the source collection, "showMigrationEvents" is set false to avoid range deletions, whereas "showSystemEvents" is set to true to capture the 'reshardBlockingWrites' event.
      • When monitoring the resharding temporary collection, "showMigrationEvents" is set to true since events (including the 'reshardingDoneCatchUp' event) against the temporary collections all have fromMigrate": true, whereas "showSystemEvents" to false since the monitor doesn't need to watch any system events.

      This is tested end-to-end when the verification is enabled in SERVER-98586. However, we should still add unit tests for this in ReshardingChangeStreamsMonitorTest. 

            Assignee:
            ben.gawel@mongodb.com Ben Gawel
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: