[CDRIVER-3314] Test that retryable writes applies to read_write_command helpers Created: 13/Aug/19  Updated: 31/Mar/22

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

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-2733

 Description   

The read_write command helpers, like mongoc_client_read_write_command_with_opts apply both default read and write concern and read preferences. Because we consider it a write command, we apply retry writes logic. Let's write tests to validate this behavior.



 Comments   
Comment by Jeremy Mikola [ 20/Aug/19 ]

IMO, the logic for retryable reads is only intended to apply to read commands that do not write.

Since this helper is intended for methods that both read and write (i.e. may inherit a read and write concern), I don't think retryable read logic should apply at all. Users should not be using this method to execute read-only commands (e.g. find, counts using aggregate).

It's reasonable to allow retryable write logic, since we'll inspect whether the command is supported.

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