Skip to content

PYTHON-2777 Raise client side error for snapshot reads on <5.0 #659

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 4 commits into from
Jun 29, 2021

Conversation

ShaneHarvey
Copy link
Member

No description provided.

@ShaneHarvey ShaneHarvey marked this pull request as ready for review June 29, 2021 20:39
@ShaneHarvey ShaneHarvey changed the title PYTHON-2777 Test all snapshot read commands on unsupported servers PYTHON-2777 Raise client side error for snapshot reads on <5.0 Jun 29, 2021
if (self.options.causal_consistency
and self.operation_time is not None):
cmd.setdefault('readConcern', {})[
'afterClusterTime'] = self.operation_time
if self.options.snapshot:
if sock_info.max_wire_version < 13:
raise ConfigurationError(
Copy link
Member Author

Choose a reason for hiding this comment

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

This could be InvalidOperation or ConfigurationError. We seem to use both in this file for various "this thing is not supported" errors. Do you have a preference?

Copy link
Contributor

Choose a reason for hiding this comment

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

ConfigurationError makes more sense to me.

@ShaneHarvey ShaneHarvey merged commit 4152600 into mongodb:master Jun 29, 2021
ShaneHarvey added a commit that referenced this pull request Jun 29, 2021
@ShaneHarvey ShaneHarvey deleted the PYTHON-2777 branch June 29, 2021 21:42
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