-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1163: Prohibit session with unacknowledged write concern #814
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
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.
LGTM other than 1 typo
php_phongo.c
Outdated
|
||
/* Determine if the explicit or inherited write concern is | ||
* unacknowledged so that we can ensure it does not conflict with an | ||
* explicit of implicit session. */ |
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.
"explicit of implicit session" should be "explicit or implicit session"
a77aa65
to
159d25e
Compare
--TEST-- | ||
PHPC-1163: Unacknowledged write concern should omit implicit session | ||
--XFAIL-- | ||
Depends on CDRIVER-2615 |
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.
Tests pass locally after applying the patch from CDRIVER-2615, but feel free to verify on your own. In any event, that fix won't show up until libmongoc 1.10.
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.
LGTM, except for the extra space in one of the test files.
tests/manager/bug1163-001.phpt
Outdated
--XFAIL-- | ||
Depends on CDRIVER-2615 | ||
--SKIPIF-- | ||
<?php if (PHP_INT_SIZE !== 8) { die("skip Can't represent 64-bit ints on a 32-bit platform"); } ?> |
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.
Extra space in front of <?php
.
This adds checks to ensure that explicit sessions and unacknowledged write concerns (explicit or inherited) will not be mixed when executing bulk writes or commands. Additionally, we ensure that command execution does not create its own implicit session (per PHPC-1152) if the effective write concern is unacknowledged. Note: libmongoc still needs to ensure that it does not create implicit sessions for unacknowledged commands (CDRIVER-2615).
https://jira.mongodb.org/browse/PHPC-1163
This adds checks to ensure that explicit sessions and unacknowledged write concerns (explicit or inherited) will not be mixed when executing bulk writes or commands. Additionally, we ensure that command execution does not create its own implicit session (per PHPC-1152) if the effective write concern is unacknowledged.
Note: libmongoc still needs to ensure that it does not create implicit sessions for unacknowledged commands (CDRIVER-2615).