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

ReshardingOplogApplicationRules does not version all writes

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v5.0
    • Sharding 2021-10-04
    • 1

    Description

      ReshardingOplogApplicationRules::_applyDelete_inlock() has special logic to upon removing a document from the temporary resharding collection to move a document from one of the other stash collections (i.e. one associated with a different donor shard) into its place. The runWithTransaction() helper does so by using AlternativeSessionRegion which will construct a separate OperationContext. The write being performed in this separate OperationContext won't have shard version attached for the temporary resharding collection like the original one had. Calling initializeClientRoutingVersions() on the OperationShardingState associated with the separate OperationContext should address the delete on the temporary resharding collection not having a shard version.

      See SERVER-59023 for why this is necessary; that this was not already being done was an oversight when implementing that ticket.

      Attachments

        Issue Links

          Activity

            People

              brett.nawrocki@mongodb.com Brett Nawrocki
              brett.nawrocki@mongodb.com Brett Nawrocki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: