Write and test aggregation pipeline for iterating oplog buffer collections

XMLWordPrintableJSON

    • Fully Compatible
    • Sharding 2020-09-07
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The goal of this ticket is to create a function which allows the aggregation pipeline to easily be run locally on the (recipient) 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> createOplogBufferIteratingPipelineForResharding(
          BSONObj startAfter,  /* expected to be an object of the form {_id: {clusterTime: <Timestamp>, ts: <Timestamp>}} or isEmpty() */
      );
      

              Assignee:
              Randolph Tan
              Reporter:
              Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: