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

Fix comment in ReshardingDataReplication and update its member declaration order

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 5.0.3, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • v5.0
    • Sharding 2021-07-26
    • 1

      The ReshardingOplogApplier receives a ReshardingDonorOplogIterator which receives a ReshardingOplogFetcher*. The ReshardingOplogFetchers in ReshardingDataReplication must therefore outlive the ReshardingOplogAppliers. This requirement is already guaranteed by resharding::cancelWhenAnyErrorThenQuiesce() because ReshardingOplogAppliers will have stopped using their corresponding ReshardingOplogFetcher by the time the ReshardingDataReplication instance is destroyed.

      This comment and the member order in ReshardingDataReplication state the opposite and should be updated now that cancellation tokens are being used.

      const std::vector<std::unique_ptr<ReshardingOplogApplier>> _oplogAppliers;
      
      // The ReshardingOplogFetcher must be destructed before the corresponding ReshardingOplogApplier
      // to ensure the future returned by awaitInsert() is always eventually readied.
      const std::vector<std::unique_ptr<ReshardingOplogFetcher>> _oplogFetchers;
      const std::shared_ptr<executor::TaskExecutor> _oplogFetcherExecutor;
      

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

              Created:
              Updated:
              Resolved: