Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-1571 Retry on different mongos when possible #1450

Merged
merged 34 commits into from
Aug 25, 2023

Conversation

comandeo
Copy link

@comandeo comandeo commented Aug 16, 2023

Please complete the following before merging:

  • Update changelog.
  • Make sure there are generated JSON files from the YAML test files - not applicable, no spec tests
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, sharded clusters, and serverless).

Ruby PoC - mongodb/mongo-ruby-driver#2717
Go PoC - mongodb/mongo-go-driver#1358

source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-reads/retryable-reads.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
comandeo-mongo and others added 15 commits August 17, 2023 10:25
@comandeo comandeo marked this pull request as ready for review August 21, 2023 15:05
@comandeo comandeo requested review from a team as code owners August 21, 2023 15:05
@comandeo comandeo removed the request for review from a team August 21, 2023 15:05
@comandeo comandeo requested review from patrickfreed and kkloberdanz and removed request for a team August 21, 2023 15:05

2. Create a client per mongos using the direct connection, and configure fail
points on each of the picked mongoses, so that each mongos raises
a retryable error once.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include that the failpoint should be configured with a "RetryableWriteError" label?

Copy link
Author

Choose a reason for hiding this comment

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

Good point! Added errorLabels: ['RetryableWriteError'] to the failpoint specification above.

mongoses in the cluster, pick one to test against.

2. Create a client that connects to the mongos using the direct connection,
and configure a fail point so that the mongos raises a retryable error once.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we include that the failpoint should be configured with a "RetryableWriteError" label?

Copy link
Author

Choose a reason for hiding this comment

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

Done.

source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@alexbevi alexbevi left a comment

Choose a reason for hiding this comment

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

Minor cosmetic tweaks. Great work! LGTM

source/retryable-reads/retryable-reads.rst Outdated Show resolved Hide resolved
source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-reads/tests/README.rst Outdated Show resolved Hide resolved
source/retryable-writes/tests/README.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
source/server-selection/server-selection.rst Outdated Show resolved Hide resolved
@comandeo comandeo merged commit 86d961f into mongodb:master Aug 25, 2023
3 checks passed
@comandeo comandeo deleted the 1571-retry-on-different-mongos branch August 25, 2023 18:26
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.

6 participants