-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-2834 Direct read/write retries to another mongos if possible #1421
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
Changes from all commits
8959b7e
590e82c
8eb6361
1e782f4
04789af
e257525
309f858
fcffe30
6aafc26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1153,3 +1153,9 @@ def prepare_spec_arguments(spec, arguments, opname, entity_map, with_txn_callbac | |
raise AssertionError(f"Unsupported cursorType: {cursor_type}") | ||
else: | ||
arguments[c2s] = arguments.pop(arg_name) | ||
|
||
|
||
def set_fail_point(client, command_args): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use the with self.fail_point() helper instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to set the fail point on each individual mongos to ensure the failure occurs on every node. |
||
cmd = SON([("configureFailPoint", "failCommand")]) | ||
cmd.update(command_args) | ||
client.admin.command(cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for mongos in client_context.mongoses:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change causes the following error: