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

Version multi-updates and multi-deletes in sharded transactions

    • Fully Compatible
    • Sharding 2018-12-03

      Currently, mongos sends updates and deletes that target more than one shard to all shards, without shard versions because normally mongos can't retry partial failures from stale shard version errors. In a transaction, mongos can retry on partial failures (or abort the writes entirely on each shard), so the router should be able to version writes that target more than one shard.

      This prevents the scenario where mongos starts a transaction on a collection it is stale for with an unversioned write, which acquires a lock on the stale collection and holds it for the lifetime of the transaction, preventing the shard from refreshing its filtering metadata for the stale collection until the transaction completes (because the refresh requires an exclusive lock on the stale collection). In this case, any stale versioned writes would hang waiting for the transaction to finish when the shard tries to refresh its metadata.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: