[SERVER-37045] Consider not allowing killCursors to start a cross-shard transaction Created: 07/Sep/18  Updated: 09/Apr/20  Resolved: 19/Nov/18

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: Jack Mulrow
Resolution: Duplicate Votes: 0
Labels: ShardedTxn:GlobalSnapshot, todo_in_code
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-36587 Committing a transaction which was st... Closed
depends on SERVER-37349 Subsequent statements in a transactio... Closed
Related
related to SERVER-43425 Remove TODO listed in SERVER-37045 Closed
Sprint: Sharding 2018-12-03
Participants:

 Description   

Currently, killCursors is one of the commands allowed to start a transaction. All requests sent to a shard as part of these commands forward the transaction options of the cross-shard transaction and start single replica set transactions (cluster killCursors can do so if it kills a pinned cluster cursor). Shards aren't allowed to change the read concern of their local transaction once it has been started, so the first request to each shard must include the read concern that will be used for the remainder of the cross-shard transaction, including the atClusterTime read concern option. Unfortunately, this means killCursors must select and pin a global read timestamp for the entire cross-shard transaction, even though it has no real meaning when killing a cursor and the command cannot easily leverage the targeted shards to pick a good timestamp (that avoids no-op writes or reduces the chance write conflicts).

This ticket is to consider preventing killCursors from starting a cross-shard transaction, to avoid the issues above. It would still be allowed as a subsequent statement, so users can kill any cursors established in their current transaction, but they would not be able to start a new transaction that kills an already existing cursor.

As part of this ticket, the ability to select a global read timestamp should be removed from cluster killCursors.

 



 Comments   
Comment by Githook User [ 09/Apr/20 ]

Author:

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

Message: SERVER-43425 Remove TODO listed in SERVER-37045
Branch: master
https://github.com/mongodb/mongo/commit/177d55adfd397de4b78f35a2da0bdd9160c623c7

Comment by Jack Mulrow [ 19/Nov/18 ]

Disallowing killCursors as the first command in a transaction was done in SERVER-36587 and removing the global read timestamp logic from killCursors was done in SERVER-37349, so closing this ticket as a duplicate.

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