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

Insert no-op entries into oplog buffer collections for resharding so resuming is less wasteful

    XMLWordPrintable

Details

    • Fully Compatible
    • v5.0
    • Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09
    • 2

    Description

      Insert a no-op entry with

      {_id: {
          clusterTime: <latest oplog timestamp from donor's cursor response>,
          ts: <latest oplog timestamp from donor's cursor response>,
      }}
      

      into the oplog buffer collection on the recipient shard. The <latest oplog timestamp from donor's cursor response> refers to the getLatestOplogTimestamp() value exposed in aggregation cursor command responses on oplog from SERVER-49895.

      The no-op entry should be inserted using its own storage transactions and its Collection::insertDocument() call must be allowed to fail with a duplicate key error. This is because it is possible for the donor shard to not have generated any more oplog entries since the last getMore the recipient shard sent and therefore for the same getLatestOplogTimestamp() to be returned.

      Attachments

        Issue Links

          Activity

            People

              janna.golden@mongodb.com Janna Golden
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: