Skip to content

Increasing mongodb safety#11

Open
MirkoBonadei wants to merge 8 commits into
masterfrom
increasing_mongodb_safety
Open

Increasing mongodb safety#11
MirkoBonadei wants to merge 8 commits into
masterfrom
increasing_mongodb_safety

Conversation

@MirkoBonadei

Copy link
Copy Markdown
Contributor

We have created a Factory to force the w option of the MongoClient to majority.

The default w is 1 and in case of failover there is the possibility that the new PRIMARY does not have the writes of the previous one. This is a potential issue for our queue engine so we force w=majority everywhere.

MirkoBonadei and others added 5 commits April 14, 2016 11:24
We want to have a single point to create instances of MongoClient connections.
The goal behind this idea is to force the "w" => "majority" to all the recruiter2 connections.
I can create a mongodb object
@MirkoBonadei

Copy link
Copy Markdown
Contributor Author

The build is broken because on TravisCI we have not configured a replica set. We are going to fix in the afternoon.

@MirkoBonadei

Copy link
Copy Markdown
Contributor Author

Ok, after an upgrade of the testing environment to Mongo 3.* TravisCI works fine because the w=majority seems to be parsed even if there is not replica set (this was not the case with Mongo 2.*).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant