[SERVER-34557] Allow running transactions against primaries with readPreferences other than 'primary' Created: 18/Apr/18 Updated: 29/Oct/23 Resolved: 02/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | William Schultz (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||||||||||
| Sprint: | Repl 2018-05-07 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
We want to restrict transactions to only run on primaries. The way We should undo the server changes from |
| Comments |
| Comment by Githook User [ 09/Oct/19 ] |
|
Author: {'username': 'jasonjhchan', 'email': 'jason.chan@mongodb.com', 'name': 'Jason Chan'}Message: (cherry picked from commit 381acc4baa6d5f730fb77be5acc39f8473a16b88)
(cherry picked from commit 978ee4b254f75351006648577f1e0fd3673ee412) |
| Comment by Jason Chan [ 27/Sep/19 ] |
|
The bug fixes in this ticket should be backported to v3.6: Filed |
| Comment by Githook User [ 04/May/18 ] |
|
Author: {'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}Message: |
| Comment by Githook User [ 02/May/18 ] |
|
Author: {'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}Message: |
| Comment by William Schultz (Inactive) [ 02/May/18 ] |
|
With this change, transactions should now only be allowed to run against a replica set primary, but with any read preference that is supported on primary. We no longer explicitly take the read preference into account when determining whether a transaction is allowed to execute. We instead directly check the replication member state for that node i.e. PRIMARY, SECONDARY, etc. |
| Comment by Githook User [ 02/May/18 ] |
|
Author: {'email': 'william.schultz@mongodb.com', 'name': 'William Schultz', 'username': 'will62794'}Message: |
| Comment by Bernie Hackett [ 26/Apr/18 ] |
|
Not just 'primaryPreferred', that's the case with OP_MSG. With OP_QUERY we set the slaveOk wire protocol bit, which the server translates to 'secondaryPreferred.' |