Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
jmikola merged 4 commits into mongodb:master from jmikola:phpc-448
Dec 11, 2015
Merged

PHPC-448: Read concern support #158

jmikola merged 4 commits into mongodb:master from jmikola:phpc-448
Dec 11, 2015

Conversation

@jmikola
Copy link
Member

@jmikola jmikola commented Dec 10, 2015

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Member Author

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).

Copy link
Contributor

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.

Copy link
Member Author

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. 👍

@jmikola jmikola force-pushed the phpc-448 branch 2 times, most recently from 8e4f4f4 to 009e6ce Compare December 11, 2015 20:21
@jmikola jmikola merged commit 90d438e into mongodb:master Dec 11, 2015
jmikola added a commit that referenced this pull request Dec 11, 2015
@jmikola jmikola deleted the phpc-448 branch December 11, 2015 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /