-
Notifications
You must be signed in to change notification settings - Fork 917
GODRIVER-3668 Add bypassEmptyTsReplacement option. #2219
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
base: master
Are you sure you want to change the base?
Conversation
🧪 Performance ResultsCommit SHA: 446c2e1The following benchmark tests for version 68e51cf3f83d2a00074816f5 had statistically significant changes (i.e., |z-score| > 1.96):
For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch. |
API Change Report./v2/x/mongo/driver/operationcompatible changes(*FindAndModify).AdditionalCmd: added |
f42d087
to
446c2e1
Compare
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.
Pull Request Overview
This PR adds the bypassEmptyTsReplacement option to various MongoDB write operations by implementing an "addCommandFields" mechanism that allows arbitrary command fields to be added to operations.
- Adds support for bypassEmptyTsReplacement option across insert, update, replace, findOneAndUpdate, findOneAndReplace, and bulk write operations
- Implements addCommandFields functionality in internal options handling to support additional command parameters
- Adds comprehensive test coverage to verify the option is properly passed through to MongoDB commands
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
x/mongo/driver/xoptions/options.go | Adds "addCommandFields" case handling to all internal option setters |
x/mongo/driver/operation/update.go | Adds additionalCmd field and AdditionalCmd method to Update operation |
x/mongo/driver/operation/insert.go | Adds additionalCmd field and AdditionalCmd method to Insert operation |
x/mongo/driver/operation/find_and_modify.go | Adds additionalCmd field and AdditionalCmd method to FindAndModify operation |
mongo/collection.go | Integrates addCommandFields option handling into collection methods |
mongo/client_bulk_write.go | Adds additionalCmd field to clientBulkWrite struct |
mongo/client.go | Integrates addCommandFields option handling into Client.BulkWrite |
mongo/bulk_write.go | Adds additionalCmd field and integrates it into bulk write operations |
internal/integration/collection_test.go | Adds comprehensive tests for bypassEmptyTsReplacement option |
internal/integration/client_test.go | Adds tests for client bulk write with bypassEmptyTsReplacement and fixes test assertions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
GODRIVER-3668
GODRIVER-3582
Summary
Add bypassEmptyTsReplacement option to:
Background & Motivation