[CDRIVER-2387] Optimize access for retryWrites URI option Created: 17/Nov/17  Updated: 07/Mar/23

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

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-2228 All writes retryable support Closed
is related to CDRIVER-2386 Refactor findAndModify helper to use ... Backlog
is related to CDRIVER-2379 Optimize txnNumber rewriting Closed

 Description   

In the initial implementation of retryable writes, mongoc-cmd.c uses
mongoc_uri_get_option_as_bool() to check the value of the retryWrites option. This uses BSON iteration and may occur on every write command that allows a transaction number for the given wire version. We should look into making this more efficient. If the URI will never change after client construction, perhaps we can read the option once at the time a client is initialized.


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