-
Notifications
You must be signed in to change notification settings - Fork 88
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
MONGOCRYPT-661 enable "range" by default #861
Conversation
unconditionally set `use_range_v2` to true
Document "rangePreview" and "RangePreview" as removed. Using either results in an error. Keep documentation of "range" as unstable. Protocol changes are in progress. "range" is expected to be stable for the upcoming 1.11.0 release.
expect error when "rangePreview" is used
expect an error when "rangePreview" is used
This check may be unnecessary. libmongocrypt validates options. However, the check is kept and updated to use "Range" to avoid changing the thrown exception.
I added that so existing apps that use rangePreview on MongoDB <=7.0 wouldn't break when upgrading to the latest version of pymongocrypt. If the plan is to break "rangePreview" across the board then that you can go ahead and remove the enable_range_v2 argument and property. Users will just need to pin to an older version of pymongocrypt or upgrade to "range". |
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.
Python changes LGTM.
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.
Java changes LGTM!
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.
Java code - LGTM
Summary
This PR partially resolves MONGOCRYPT-661:
mongocrypt_setopt_use_range_v2
as it is no longer necessary.Background & Motivation
Patch build: https://spruce.mongodb.com/version/66912f5f6df6a60007ec877e
As implemented, libmongocrypt does not currently support both "range" and "rangePreview" simultaneously. Instead,
mongocrypt_setopt_use_range_v2
controls whether "range" is supported. Server 8.0 drops the experimental "rangePreview". Drivers are expected to drop "rangePreview" as well.I expect removing "rangePreview" in a minor release is OK. "rangePreview" was documented as unstable in libmongocrypt and in drivers as "experimental only". For historical precedent: the unstable QEv1 protocol was updated to the incompatible QEv2 protocol in minor libmongocrypt release for DRIVERS-2435.
Documentation noting "range" as unstable is expected to be short-lived. Once remaining "range" protocol changes are completed, a subseqent PR is planned to document "range" as stable.
This PR includes updates to language bindings to fix tests and update documentation. Notably, Python's
enable_range_v2
is not modified. It may be OK to deprecate or remove as it is no-longer-needed (rangeV2 is always enabled).