[JAVA-2815] Support transactions Created: 19/Mar/18  Updated: 28/Oct/23  Resolved: 18/Jun/18

Status: Closed
Project: Java Driver
Component/s: Session Management
Affects Version/s: None
Fix Version/s: 3.8.0

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: required-for-beta
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-417 Implement Transactions spec Closed
Epic Link: Java MongoDB 4.0 Support

 Comments   
Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add UnknownTransactionCommitResult error label

Update UnknownTransactionCommitResult error labelling to reflect the
specification
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/193cce8bd052d27a3187b73d0084b812b9579221

Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add UnknownTransactionCommitResult error label

Add UnknownTransactionCommitResult error label for MongoTimeoutException
as required by the specification.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/9ad83aac4f8233737a677ad8b6f8896dcaafdcd7

Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add TransientTransactionError error label

Add TransientTransactionError error label for MongoTimeoutException
as required by the specification. Currently there's no strategy to
test this, as the classes in which it's implemented are not easily
subject to mocking.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2961ce54f244e20809d15b2cc4150ae1e4307680

Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add TransientTransactionError error label for reads
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2247c7ddbe3cc7021ada26cbcfd84436aff2ab17

Comment by Githook User [ 18/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Improve transaction test error assertion failure messages

Add the operation name to the assertion messages so that it's clearer
which operation is causing the assertion to fire.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/55c4571d71c5327202408a98ac90932502b80412

Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Complete error label support
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f77e7b532afe5b51b587a08ca8d46d089ceb5a52

Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: startTransaction should throw when write concern is unacknowledged
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2ddef35da5d905d1d586d4933cb5b6a47d87ab21

Comment by Githook User [ 12/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Retry a commit or abort of a transaction once
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/4fc343609d498bf790510efabcdf119c6e81be25

Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Support TransientTransactionError for MongoSocketException

This commit adds the TransientTransactionError error label to any
MongoSocketException thrown while a transaction is active.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fa16d595c8f61272b9a0d63dff3abb3fff21b9ff

Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add error label support to MongoException
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/9c9ab77bb12ce79ad1162724da2d68a535d72609

Comment by Githook User [ 04/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Update to latest transaction spec tests
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/69aa29411b99b47e5cadca0bea6ae4c7a7b71a37

Comment by Githook User [ 04/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Support object receiver syntax in transaction spec tests
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/1b3dedb0b1050d5e25617add9f2fd375016ccd55

Comment by Githook User [ 04/Jun/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add transaction tests for runCommand
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/b7b9c075669d759cb066acf2fcb3b2e07704e3a5

Comment by Githook User [ 31/May/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Transaction state updates

Change transaction state on first operation after commit from DONE to
NONE, and after abort from ABORTED to NONE.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/fff1bbd1b4ceee81c67389c566230297f84e5691

Comment by Githook User [ 21/May/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Add ability to retry commitTransaction
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/1746ad56aa276e9d954ec84abf5c7871cf8080d5

Comment by Githook User [ 18/May/18 ]

Author:

{'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}

Message: JAVA-2815: Update transactions spec bulk write test
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e7b2b4d8e1f299a1956fad292ce0775d7e20bcda

Comment by Githook User [ 17/May/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Remove autoStartTransaction option
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/17a5cc24fad3c394c4ad4b1167c6fa7ab654c5eb

Comment by Githook User [ 15/May/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Fix read concern regression

In implementing transactions, a regression in the async driver was
introduced in sending read concern outside of transactions. This
commit fixes the regression and adds an integration test for both the
sync and async drivers.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/99c2e19c32202402221ddd90fc83092c1deacb01

Comment by Githook User [ 15/May/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Add read preference property to transaction options
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/eaf4292b26b374d00e37c61a32eb5641803e35a3

Comment by Githook User [ 25/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Remove stmtId

The statement identifier is no longer required by the server.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/b1d3c15fb43a3a32c5351f8fa6e886f03884cba1

Comment by Githook User [ 23/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: auto-start transaction on first operation

The transactions specification changed such that a client session with
autoStartTransaction enabled should delay starting the transaction until
the first operation is executed against it.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/611770e5f1806902e641a8a67bfd11f5541c94aa

Comment by Githook User [ 23/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Inlined method that no longer serves a useful purpose.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/03b62d79d397c448deb949cb70d35fe51ea4004c

Comment by Githook User [ 23/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Use mutable write concern property on Mongo for default transaction options
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/a4394c67671cd78f6427e247e3b2f1b0531bf187

Comment by Githook User [ 20/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Implement transactions in the asynchronous API
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/d0d762f81b0526dcb6dbd9edb50218c78140858b

Comment by Githook User [ 18/Apr/18 ]

Author:

{'email': 'jeff.yemin@10gen.com', 'username': 'jyemin', 'name': 'Jeff Yemin'}

Message: JAVA-2815: Add support for transactions to the synchronous API

A few notes on the design and implementation:

  • It introduces a small but significant breaking change to the existing
    API for any applications that already depend on session support
    (introduced in the 3.6 release to support causal consistency): the type
    of ClientSession changes from com.mongodb.session.ClientSession to
    com.mongodb.client.ClientSession. This is both source and binary
    incompatible.
  • It adds an overload to MongoClient.startSession that takes no
    ClientSessionOptions, as we expect it to be a common pattern to not
    need any options.
  • Internally, it moves ReadConcern from a property of ReadOperation
    implementation classes to a property of the SessionContext, so that
    ReadConcern can be applied properly when in a transaction (transactions
    require that read concern is specified only on the first command of
    a transaction, regardless of whether it's a read or a write
    Branch: master
    https://github.com/mongodb/mongo-java-driver/commit/94744eefaae2cd2bc60ab914dc77744be646d834
Generated at Thu Feb 08 08:58:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.