[GODRIVER-1245] Transactions Bugs Created: 20/Aug/19  Updated: 28/Oct/23  Resolved: 26/Aug/19

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: None
Fix Version/s: 1.1.2

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

This ticket is an umbrella for bugs in our transactions implementation that were found when writing a spec test runner as part of GODRIVER-251:

  1. abortTransaction should ignore all server errors. Relevant section of the spec: "After the retryable write attempt, drivers MUST ignore all errors from the abortTransaction command"
  2. In Operation.Execute, we use the operation's read preference for server selection but use the transaction's read preference when creating the wire message. This can cause a mismatch. For example, if a collection with read preference secondary is used to run a transaction with read preference primary, a secondary will be selected but $readPreference will be primary in the wire message, causing a NotMaster error. We should use the transaction's read pref for everything.


 Comments   
Comment by Githook User [ 24/Sep/19 ]

Author:

{'name': 'Divjot Arora', 'username': 'divjotarora', 'email': 'divjot.arora@10gen.com'}

Message: Transactions bug fixes

  • Ignore all command errors from AbortTransaction
  • Use transaction's read preference for server selection

GODRIVER-1245

Change-Id: I9f62cec3fac07628586187504e33bcfe5679db64
Branch: release/1.1
https://github.com/mongodb/mongo-go-driver/commit/7f54217c535604a8c83a70ce6bd084bc02265bab

Comment by Githook User [ 26/Aug/19 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: Transactions bug fixes

  • Ignore all command errors from AbortTransaction
  • Use transaction's read preference for server selection

GODRIVER-1245

Change-Id: I9f62cec3fac07628586187504e33bcfe5679db64
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/d7f1b555adc0a0cec08114e1ac157d2342bb8c4c

Comment by Divjot Arora (Inactive) [ 22/Aug/19 ]

CR: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/465971

Generated at Thu Feb 08 08:36:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.