Skip to content

GODRIVER-3123 QE Range Protocol V2 #1723

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 6 commits into from
Aug 19, 2024
Merged

Conversation

qingyang-hu
Copy link
Collaborator

@qingyang-hu qingyang-hu commented Jul 31, 2024

GODRIVER-3123
GODRIVER-3279
GODRIVER-3195

Summary

  • Add an optional parameter RangeOpts.trimFactor.
  • Make RangeOpts.sparsity optional.
  • Modify rangePreview to range.
  • Implement prose test "Range Explicit Encryption applies defaults".
  • Sync spec test.
  • Update libmongocrypt to 1.11.0
  • Document "range" as stable.

Background & Motivation

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label Jul 31, 2024
Copy link
Contributor

API Change Report

./mongo/options

incompatible changes

RangeOptions.Sparsity: changed from int64 to *int64

compatible changes

(*RangeOptions).SetTrimFactor: added
RangeOptions.TrimFactor: added

./x/mongo/driver/mongocrypt/options

incompatible changes

ExplicitRangeOptions.Sparsity: changed from int64 to *int64

compatible changes

ExplicitRangeOptions.TrimFactor: added

@qingyang-hu qingyang-hu force-pushed the godriver3123 branch 8 times, most recently from 23f829d to 3aed8b9 Compare August 1, 2024 15:59
@qingyang-hu qingyang-hu force-pushed the godriver3123 branch 2 times, most recently from ad04b31 to d198255 Compare August 2, 2024 14:10
@qingyang-hu qingyang-hu force-pushed the godriver3123 branch 2 times, most recently from a5f3b4b to 249120b Compare August 2, 2024 17:25
@qingyang-hu qingyang-hu marked this pull request as ready for review August 5, 2024 14:48
@qingyang-hu qingyang-hu requested review from matthewdale, kevinAlbs and blink1073 and removed request for kevinAlbs August 5, 2024 14:49
blink1073
blink1073 previously approved these changes Aug 7, 2024
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!

@@ -81,7 +82,7 @@ func (e *EncryptOptions) SetContentionFactor(contentionFactor int64) *EncryptOpt
return e
}

// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "rangePreview".
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "range".
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the algorithm be "Range", with a capital "R"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was following the specs but I think you are correct. Will commit a specs PR.

@@ -81,7 +82,7 @@ func (e *EncryptOptions) SetContentionFactor(contentionFactor int64) *EncryptOpt
return e
}

// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "rangePreview".
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "range".
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Add a blank line here to make the "Beta" warning more visible.

Suggested change
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "range".
// SetRangeOptions specifies the options to use for explicit encryption with range. It is only valid to set if algorithm is "range".
//

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we add Range to the list of supported values for EncryptOptions.SetAlgorithm?

return ro
}

// SetTrimFactor sets the range index trim factor.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional: Add a blank line here to make the "Beta" warning more visible.

Suggested change
// SetTrimFactor sets the range index trim factor.
// SetTrimFactor sets the range index trim factor.
//

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These notes will be removed in GODRIVER-3195 shortly.

Copy link
Collaborator

@matthewdale matthewdale left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@qingyang-hu qingyang-hu merged commit a766876 into mongodb:v1 Aug 19, 2024
30 of 33 checks passed
blink1073 pushed a commit to blink1073/mongo-go-driver that referenced this pull request Aug 19, 2024
blink1073 added a commit that referenced this pull request Aug 20, 2024
Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants