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

XMLWordPrintableJSON

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

      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
              Reporter:
              Cheahuychou Mao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: