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

Adapt resharding's oplog fetcher to use the `Shard` interface for running commands

    XMLWordPrintable

Details

    • Fully Compatible
    • Sharding 2020-11-02, Sharding 2020-11-16, Sharding 2020-11-30
    • 0

    Description

      Resharding's oplog fetcher is currently using a DBClientBase for runningĀ an aggregation request to fetch oplog entries.

      The DBClientBase omits some critical behavior such as:

      • Not updating the logical clock values when receiving a response
      • Does not perform targetting
      • Will not use connections from a pool

      Likewise, Shard has some limitations that made it difficult to use for the first milestone:

      • Lack of aggregation support
      • Does not expose a cursor/streaming interface
        Shard also does not support exhaust cursors which is not necessary for a milestone, but would be an unfortunate lost optimization. It's unlikely that the underlying async Fetcher library that Shard uses will ever be able to make use of exhaust cursors.

      When doing this ticket, it may be worth considering some unrealized optimizations when writing documents into the oplog. Specifically, batching an entire response into a single WUOW/transaction without requiring the caller making a copy of the response's buffer of BSON objects.

      Attachments

        Issue Links

          Activity

            People

              daniel.gottlieb@mongodb.com Daniel Gottlieb
              daniel.gottlieb@mongodb.com Daniel Gottlieb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: