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

Write and test aggregation pipeline for config.transactions cloner for resharding

    • Fully Compatible
    • Sharding 2020-09-21
    • 0

      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.

            Assignee:
            eric.maynard@mongodb.com Eric Maynard
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: