-
Notifications
You must be signed in to change notification settings - Fork 549
CXX-1853, CXX-1947 pass hint to update and delete #694
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
Conversation
| [](document::view doc, bsoncxx::array::element ele) { | ||
| REQUIRE_BSON_MATCHES(doc, ele.get_document().value); | ||
| return true; | ||
| }); |
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.
During my debugging efforts, I had a difficult time trying to parse what was happening here. I realized all this did was assert that two lists contained the same elements and had the same length. REQUIRE_BSON_MATCHES will show mismatches in the debugging output.
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.
Updated this in the last commit. Since this checks from begin(range1) to end(range1) and iterates range2 this would've returned true if range1 was empty. I swapped the ranges so we check at least the length of expected_data. Afterward actual should be empty since it's a cursor if they're the same length.
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.
Also, I removed the write_concern swap logic and ran it on evergreen (here). All of the tests pass so I'm not sure if we still need it.
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.
Ah, nevermind. After investigating CDRIVER-2901 it seems better to leave it in.
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.
This looks a lot cleaner. And I agree, using local read concern seems necessary.
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
==========================================
+ Coverage 83.61% 83.75% +0.14%
==========================================
Files 346 346
Lines 16009 16107 +98
==========================================
+ Hits 13386 13491 +105
+ Misses 2623 2616 -7
Continue to review full report at Codecov.
|
kevinAlbs
left a comment
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.
Changes LGTM
No description provided.