-
Notifications
You must be signed in to change notification settings - Fork 211
PHPC-448: Read concern support #158
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.
This was unexpected in light of a504d05, as MO should have launched the replica set nodes with --enableMajorityReadConcern; however, we are still asserting that the option is passed through the find command.
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.
Have you updated your installed version of mongo-orchestration?
I'd imagine you launched the vm long before mongo-orchestration got the feature, and probably haven't updated since.
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.
Perhaps it's also worth having a 3.0 and a 3.2 test variant of this?
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.
@bjori: The VM was created from scratch this week, as we updated things for MongoDB 3.2.
pip install --upgrade 'git+https://github.com/10gen/mongo-orchestration.git#egg=mongo_orchestration'
AFAIK, that line from our VM setup is pulling the latest version of MO (0.6.dev0 according to our current VM).
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.
I think your environment might be not complete.
Can you merge #160 and run
$ vagrant provision mo
$ vagrant ssh mo
$ sudo mongo-orchestration -f mongo-orchestration-config.json -b 192.168.112.10 --enable-majority-read-concern stop
$ sudo mongo-orchestration -f mongo-orchestration-config.json -b 192.168.112.10 --enable-majority-read-concern start
$ logout
$ php scripts/start-servers.php
$ php -n -c. tests/replicaset/readconcern-001.phpt
I get
php -n -c. tests/replicaset/readconcern-001.phpt
--TEST--
ReadConcern: MongoDB\Driver\Manager::executeQuery() with readConcern option (find command)
--SKIPIF--
--FILE--
array(1) {
[0]=>
object(stdClass)#6 (2) {
["_id"]=>
int(2)
["x"]=>
int(2)
}
}
FAILED: Expected MongoDB\Driver\Exception\RuntimeException thrown, but no exception thrown!
===DONE===
Which I consider to be correct, considering mongod is supposed to be running correctly.
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.
Totally my fault. My custom shell script that restarts MO (necessary if some of the cluster tests leave it in a bad state) was missing --enable-majority-read-concern. I've got it working now, and have updated the test to insert with a majority write concern so that both the local and majority read concern pick up the data. 👍
a8dc91b to
b29832d
Compare
8e4f4f4 to
009e6ce
Compare
009e6ce to
90d438e
Compare
https://jira.mongodb.org/browse/PHPC-448