[SERVER-49898] Write and test aggregation pipeline for config.transactions cloner for resharding Created: 25/Jul/20  Updated: 29/Oct/23  Resolved: 17/Sep/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.8.0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Eric Maynard
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-config-txn-clone
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Gantt Dependency
has to be done before SERVER-49899 Create config.transactions cloner for... Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-09-21
Participants:
Linked BF Score: 0

 Description   

The goal of this ticket is to create a function which allows the aggregation pipeline to easily be sent to a remote (donor) shard and for the aggregation pipeline to be unit-testable with DocumentSourceMock. It is preferable to use DocumentSourceXX::create() functions (or DocumentSourceXX::parseFromBSON() when the former isn't available or is too tedious) rather than building it up with string concatenation. DocumentSources can be conditionally added to the Pipeline::SourceContainer, for example, to reflect a stage being added only when resuming on a new cursor.

std::unique_ptr<Pipeline, PipelineDeleter> createConfigTxnCloningPipelineForResharding(
    mongo::Timestamp fetchTimestamp,  /* never isNull() */
    BSONObj startAfter,  /* expected to be an object of the form {_id: <any>} or isEmpty() */
);

Some of these parameters are probably more appropriate to take by const-ref because their contents can only be copied into the Pipeline anyway.



 Comments   
Comment by Githook User [ 16/Sep/20 ]

Author:

{'name': 'Eric Maynard', 'email': 'eric.maynard@mongodb.com', 'username': 'ermay12'}

Message: SERVER-49898 fixed a test case that was using an invalid iterator
Branch: master
https://github.com/mongodb/mongo/commit/2d9adbdb1b56231cf4b60111b13fe1be3375ca5d

Comment by Githook User [ 14/Sep/20 ]

Author:

{'name': 'Eric Maynard', 'email': 'eric.maynard@mongodb.com', 'username': 'ermay12'}

Message: SERVER-49898 Write and test aggregation pipeline for config.transactions cloner for resharding
Branch: master
https://github.com/mongodb/mongo/commit/df35b8c64d3c502b25f358a2538fc202bbc20c76

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