Skip to content

Problem: BigchainDB has un-necessary code to initialize a replica set and check if MongoDB was started with replicaSet#2491

Merged
shahbazn merged 7 commits intobigchaindb:masterfrom
shahbazn:mdb-backend-refactor
Aug 31, 2018
Merged

Problem: BigchainDB has un-necessary code to initialize a replica set and check if MongoDB was started with replicaSet#2491
shahbazn merged 7 commits intobigchaindb:masterfrom
shahbazn:mdb-backend-refactor

Conversation

@shahbazn
Copy link
Copy Markdown
Contributor

@shahbazn shahbazn commented Aug 29, 2018

Solution: Remove un-necessary code. Deployment of MongoDB with or without replicaSet should be the responsibility of MongoDB admin which can and cannot be a BigchainDB node operator. As far as BigchainDB is concerned replicaset, if provided in bigchaindb configs, should be used to establish connection with MongoDB.

Resolves #2449

Signed-off-by: Shahbaz Nazir <[email protected]>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 29, 2018

Codecov Report

Merging #2491 into master will increase coverage by 0.35%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2491      +/-   ##
==========================================
+ Coverage   91.13%   91.48%   +0.35%     
==========================================
  Files          41       41              
  Lines        2447     2397      -50     
==========================================
- Hits         2230     2193      -37     
+ Misses        217      204      -13

@shahbazn shahbazn changed the title Problem: Unnecessary code related to mongodb replicaset in bigchaindb Problem: BigchainDB has un-necessary code to initialize a replica set and check if MongoDB was started with replicaSet Aug 29, 2018
Copy link
Copy Markdown
Contributor

@vrde vrde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are other places where replica, replica set and replicaset are used, for example in the docs and in the config. Please make sure those instances are removed as well.

@shahbazn
Copy link
Copy Markdown
Contributor Author

@vrde Those instances of replicaset do not need to be removed as replicaset config is still going to be used to login to a MongoDB which was deployed as part of a replicaset. This PR merely relieves BigchainDB of initializing a replicaset or checking if replica set was properly started as that should be the responsibility of DB admin.

@shahbazn shahbazn requested a review from ttmc August 30, 2018 11:43
Copy link
Copy Markdown
Contributor

@ttmc ttmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a one-line note in the docs page about the database.replicaset configuration setting to note that the replicaset must already exist and if it doesn't, BigchainDB won't create it.

http://docs.bigchaindb.com/projects/server/en/master/server-reference/configuration.html#database

@shahbazn shahbazn merged commit 2d1f670 into bigchaindb:master Aug 31, 2018
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.

5 participants