[SERVER-37502] Consider sending database version for all commands allowed in a transaction Created: 05/Oct/18  Updated: 06/Dec/22  Resolved: 05/Mar/19

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Fix Votes: 0
Labels: ShardedTxn:RouterSupport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-37501 Version multi-updates and multi-delet... Closed
Assigned Teams:
Sharding
Participants:

 Description   

The only command allowed in a transaction that currently sends database version is distinct. Similarly to SERVER-37501, this allows transactions to take locks for databases that the router coordinating the transaction is stale for, which would force database versioned writes outside the transaction that trigger a stale database version error to wait for the transaction to complete before the shard is able to refresh its database version metadata (because it requires an exclusive lock on the database).

If all of the commands that run in a transaction sent database version, then a transaction wouldn't be able to take locks for a database it has stale metadata for, avoiding this.



 Comments   
Comment by Gregory McKeon (Inactive) [ 05/Mar/19 ]

This is related to PM-1051, and we may address it as part of that work.

Comment by Randolph Tan [ 08/Oct/18 ]

Note that the reason the plain CRUD op commands don't currently send DB version is because it would be redundant once we make all unsharded collections own chunks.

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