[SERVER-58702] Fix comment in ReshardingDataReplication and update its member declaration order Created: 20/Jul/21  Updated: 29/Oct/23  Resolved: 21/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.3, 5.1.0-rc0

Type: Task Priority: Minor - P4
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-07-26
Participants:
Story Points: 1

 Description   

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;



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 06/Aug/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-58702 Remove outdated comment from ReshardingDataReplication.

(cherry picked from commit c43c6a146a9e5db0d15496713efa78800aeee53c)
Branch: v5.0
https://github.com/mongodb/mongo/commit/42e3818304e6fa0ea907bd9d64e3c844ec0e5da2

Comment by Githook User [ 21/Jul/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-58702 Remove outdated comment from ReshardingDataReplication.
Branch: master
https://github.com/mongodb/mongo/commit/c43c6a146a9e5db0d15496713efa78800aeee53c

Generated at Thu Feb 08 05:45:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.