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

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

      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.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: