Skip to content

CXX-3439 Add maxAdaptiveRetries and enableOverloadRetargeting URI fields#1612

Merged
eramongodb merged 3 commits into
mongodb:masterfrom
eramongodb:cxx-3328
Apr 21, 2026
Merged

CXX-3439 Add maxAdaptiveRetries and enableOverloadRetargeting URI fields#1612
eramongodb merged 3 commits into
mongodb:masterfrom
eramongodb:cxx-3328

Conversation

@eramongodb
Copy link
Copy Markdown
Contributor

Resolves CXX-3439 (CXX-3328) as followup to CDRIVER-6274 (CDRIVER-6073) and CXX-3468.

Because most changes required by the relevant JIRA issues pertain to internal (C driver) behavior or tests which the C++ driver does not implement (due to redundancy or due to blocked-on status), the only meaningful changes required for the C++ driver is extending support for querying URI options (read-only API) to include the new "maxAdaptiveRetries" and "enableOverloadRetargeting" fields.

Extending test coverage to account for these two options reveal inconsistent handling of invalid values relative to other int32 and bool fields following mongodb/mongo-c-driver#2269 (comment), where mongoc_uri_get_option_as_int32() is deliberately unused to avoid 0-special-casing, but also demoted the behavior of invalid values from "error" to "warn and ignore". This manifests as the unexpected absence of exceptions throw by the URI constructor(s) relative to the _test_int32_options() and _test_bool_options() test helper functions (discrepancies marked with "NOT an error" comments for clarity).

@eramongodb eramongodb self-assigned this Apr 21, 2026
@eramongodb eramongodb requested a review from a team as a code owner April 21, 2026 18:23
Copy link
Copy Markdown
Contributor

@connorsmacd connorsmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eramongodb eramongodb merged commit eb0ac95 into mongodb:master Apr 21, 2026
21 checks passed
@eramongodb eramongodb deleted the cxx-3328 branch April 21, 2026 19:41
@eramongodb eramongodb changed the title CXX-3439 Add maxAdaptiveRetries field to URI options CXX-3439 Add maxAdaptiveRetries and enableOverloadRetargeting URI fields Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants