[SERVER-37501] Version multi-updates and multi-deletes in sharded transactions Created: 05/Oct/18  Updated: 29/Oct/23  Resolved: 28/Nov/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.6

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: ShardedTxn:RouterSupport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-37502 Consider sending database version for... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-12-03
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 28/Nov/18 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-37501 Version multi-updates and multi-deletes in sharded transactions
Branch: master
https://github.com/mongodb/mongo/commit/fd7dfafb0ec103ac9a1c02489e8a99b32c509bdd

Generated at Thu Feb 08 04:46:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.