Skip to content

PYTHON-4449 Ensure resume options aren't combined during automatic retry #1641

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

Merged
merged 1 commit into from
May 15, 2024

Conversation

broadstack-au
Copy link
Contributor

@broadstack-au broadstack-au commented May 15, 2024

As per https://jira.mongodb.org/browse/JAVA-2987 and https://jira.mongodb.org/browse/NODE-2022

If start_at_operation_time was supplied to watch and the first event is an invalidate, or connection timeout, or anything that triggers an automatic retry - a pymongo.errors.OperationFailure is thrown with the message "Only one type of resume option is allowed, but multiple were found"

The solution from those other issues have been mimicked in this PR

Jira link: https://jira.mongodb.org/browse/PYTHON-4449

@blink1073
Copy link
Member

Thanks! Quoting from the spec: "startAtOperationTime, resumeAfter, and startAfter are all mutually exclusive; if any two are set, the server will return an error. Drivers MUST NOT throw a custom error, and MUST defer to the server error."

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM!

@blink1073 blink1073 changed the title Ensure resume options aren't combined during automatic retry PYTHON-4449 Ensure resume options aren't combined during automatic retry May 15, 2024
@blink1073 blink1073 merged commit 49466f9 into mongodb:master May 15, 2024
32 of 34 checks passed
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.

2 participants