[CDRIVER-2228] All writes retryable support Created: 01/Aug/17  Updated: 28/Oct/23  Resolved: 19/Nov/17

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.9.0

Type: New Feature Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-2192 Implement Driver Sessions API Closed
depends on CDRIVER-573 Update "not master" and "node is reco... Closed
is depended on by CXX-1415 All writes retryable support Closed
is depended on by DRIVERS-396 All writes retryable support Closed
is depended on by PHPC-986 All writes retryable support Closed
is depended on by PHPC-965 Determine how to include transaction ... Closed
Related
related to CDRIVER-2341 Segfault destroying client if one of ... Closed
related to CDRIVER-2388 Add test using 3.6 standalone with re... Closed
related to CDRIVER-2386 Refactor findAndModify helper to use ... Backlog
related to CDRIVER-2387 Optimize access for retryWrites URI o... Backlog
related to CDRIVER-2379 Optimize txnNumber rewriting Closed
Epic Link: Cdriver MongoDB 3.6 Support

 Comments   
Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 document retryWrites URI option
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/482d27c1020bcf87440c78730cfe5caea283cdb6

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 shadowed decl in mock-rs.c, part 2
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8cf9f1ccc8806841bb174e7a67a807a2dac54e8c

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 whitespace
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a5ec2504e19293f69f7af773330402923722783a

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 shadowed decl in mock-rs.c
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/30788a0b8576194ba8594cfcb85cb2b98a29389e

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 skip JSON retry tests if no crypto
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ea0478f18b4191250ed417c8827ca6f4e71257b7

Comment by Jeremy Mikola [ 18/Nov/17 ]

Implementation has been merged to master.

Reverting the issue to "In Progress" to follow up with the requested example additions.

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 enum/boolean bug in retry logic
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/daa1a4f6296474a57202eead6113501f1d96c102

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 skip retry writes test if no crypto
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e6e0647b374a92eb289258f2c6d5801374549ee2

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 test implicit sessions and command_with_opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f638e91e95a1a6d377e519c1b8641c683692c724

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 decide if a command is retryable during part assembly

This consolidates most of the decision making for a command's retryable
eligibility. Bulk operations will need to track if they include one or
more multi-document writes (akin to collation).

While the spec prohibits a generic command helper from injecting
txnNumber and supporting retryable writes, we are allowed to do so for
the write-specific command helper(s).
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e4cda04da33ccbfab57b583fb904c95312945745

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 track implicit client session on mongoc_cmd_parts_t

Previously, the lsid of an implicit session was added directly to the
command body. Since we need to access the session later during command
execution to update txnNumber (perhaps multiple times on split writes),
save the client session in mongoc_cmd_parts_t and release it when the
parts are cleaned up.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a71991b08851af816c0b4619a09f8bf3fffc5ef2

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 don't raise client error if retryWrites isn't supported
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ec2747683e85ddb891b7c1696523f451dc6c6f7f

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 reenable assertion and disallow extra documents
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f5b0fae747bbdb7b9e40b654f12c06c5e6a5624b

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 retry findAndModify commands via collection helper
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7355bb2c3032167ec3b63ac8647e2e2635303382

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 refactor retry logic in _mongoc_write_opmsg
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ebd2ca00a963fbd08a23742eafe1d776967fa4ce

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 re-order bulk write ops to avoid mid-batch error
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0eebd9521ddcb09f7eec43c3dd742685481f9b33

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 clean up after failed retry tests
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/29fd6dd87c27b41b68309d7d6e502b02c2de668b

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 mongoc_lookup_bool accepts dotted key
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ee48264f89bcc698df6a1e0f30098b28b9f3bfa9

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 leak if bulk write fails
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b66fecc63f6c53ff490590dc919ce060602424ec

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 omit "upserted" from test if empty
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7c0763db0a06901a4dbc9fdbce0eb59484686192

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 don't cache txnNumber iter

We had attempted to optimize by keeping a bson_iter_t pointed to the
location of the txnNumber field within bulk write commands, but there's
some bug with this: intermittently we send a command to the server with
txnNumber reset to 0. Let's not do this optimization now, and revisit
later.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/aa7efb1211b59fdb09166307c94055d2345b8185

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 recover from net error in bulk write

Recreate the stream to the selected server between batches, in case the
stream was closed during a retry attempt further down the stack.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e0398ef593d7388ccf3a5f56707738a10d48b12d

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 set retryWrites true in test
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1073d1dd1a561285ce55ac6d1fe8b15fa64d257d

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 rs failover test for retryable writes
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6218ae07e6dab92eb719a3ed46140a25ff6c30fe

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2228 fix code to increment txnNumber
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/027b0cebf26a1e0279f527138e75ea5acfd4ec5f

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 retryable write tests
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c469b50bd9520106d0e208470df6cf1a99607756

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 enable fail points for Evergreen RS nodes
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c2daf8cd1bdb3bac89088e01793c8f461a7f2e6f

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 add txnNumber and retry failed OP_MSG write commands
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0b9e973249c4a35ef73756cecd1c4d629127bc9a

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 transaction number on client session
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1d388e7ff2f82332f4ced061ded6a23a85065ebe

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 error if first server does not support retryable writes
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0838482db974bdd368f03838a81bc71e906642f0

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 is_retryable_write option on cmd parts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/54cf28f77ae1077b79470721a41bdd422e3b7b01

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 is_retryable option on bulk write flags
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/31fabbcb8b3123fb3ce1f06c0c5b5507c658ea4b

Comment by Githook User [ 18/Nov/17 ]

Author:

{'name': 'Jeremy Mikola', 'username': 'jmikola', 'email': 'jmikola@gmail.com'}

Message: CDRIVER-2228 retryWrites URI option
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1a5588493a07f4b38d533e79c733be1cf48c2575

Comment by A. Jesse Jiryu Davis [ 10/Nov/17 ]

Before we close this, let's update example-session.c to show retryable writes with mongoc_client_session_opts_t.

Comment by A. Jesse Jiryu Davis [ 07/Sep/17 ]

Spec is approved

Generated at Wed Feb 07 21:14:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.