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

Donor shards may create config.cache.chunks for temporary resharding collection after calculating their minFetchTimestamp

    • Fully Compatible
    • ALL
    • Sharding 2020-11-30, Sharding 2020-12-14
    • 1

      Problem Description

      Recipient shards expect to read from the donor shard's existing sharded collection and the config.cache.chunks collection of the temporary resharding collection using {atClusterTime: <fetchTimestamp>}. Refreshing the temporary resharding collection on the donor shards causes them to create the config.cache.chunks.<database>.system.resharding.<existingUUID> collection. If this config.cache.chunks collection is created after the minFetchTimestamp, then the {atClusterTime: <fetchTimestamp>} read on it would fail with a SnapshotUnavailable error response. (Or a NamespaceNotFound error response if the donor shards weren't also recipient shards.)

      Donor shards must instead create the config.cache.chunks for temporary resharding collection before calculating their minFetchTimestamp.

      Solution

      • Trigger a catalog cache refresh for the temporary resharding collection, on the DonorStateMachine, before calculating the fetchTimestamp.
      • Remove the refresh that's marked under this ticket's number as a TODO on the coordinator's state machine.

            Assignee:
            blake.oler@mongodb.com Blake Oler
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: