[SERVER-33580] Restrict multi-statement transactions to primaries Created: 01/Mar/18  Updated: 29/Oct/23  Resolved: 14/Apr/18

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

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: William Schultz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-11618 Docs for SERVER-33580: Restrict multi... Closed
Related
related to SERVER-34557 Allow running transactions against pr... Closed
is related to SERVER-37189 transactions.currentActive has a valu... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-04-23
Participants:

 Comments   
Comment by Daniel Pasette (Inactive) [ 19/Apr/18 ]

Spencer created SERVER-34557 to address Shane's issue.

Comment by Gregory McKeon (Inactive) [ 19/Apr/18 ]

shane.harvey spencer are we going to make changes to mitigate this, or should this ticket's docs changes needed description be updated?

Comment by Shane Harvey [ 18/Apr/18 ]

This change makes transactions incompatible when clients are connected directly to the primary. When the driver is connected directly to a single node it always sends primaryPreferred with OP_MSG and slaveOk with OP_QUERY.

CC: jesse, spencer

Comment by Githook User [ 14/Apr/18 ]

Author:

{'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}

Message: SERVER-33580 Restrict multi-statement transactions to replica set primaries
Branch: master
https://github.com/mongodb/mongo/commit/6eafc0790bb3602551127fa831ea859a989c384f

Comment by Spencer Brody (Inactive) [ 05/Apr/18 ]

We should still allow starting transactions on secondaries if test commands are enabled

Comment by Spencer Brody (Inactive) [ 04/Apr/18 ]

Yes it does, we made the decision not to support readonly transactions on secondaries for 4.0 after SERVER-34004 was already complete.

That work won't go to waste though, we hope to support read-only transactions on secondaries in 4.2

Comment by Siyuan Zhou [ 04/Apr/18 ]

This seems to conflict directly with SERVER-34004.

Comment by Spencer Brody (Inactive) [ 04/Apr/18 ]

We can do this by refusing to start a transaction if the read preference provided isn't primaryOnly, or if the slaveOk wire protocol bit is set.

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