From 0f61881c8caa679ad3ccff9adfd517e235d467c9 Mon Sep 17 00:00:00 2001 From: Jim OLeary Date: Wed, 21 Jun 2017 16:07:42 +0100 Subject: SERVER-29680 microbenchmarks set writeConcernMajorityJournalDefault=false in rs.initiate() --- etc/perf.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/perf.yml b/etc/perf.yml index dab4c19db20..964968aa64b 100644 --- a/etc/perf.yml +++ b/etc/perf.yml @@ -105,8 +105,18 @@ functions: set -e set -o verbose sleep 5 + # if we started a replset, initiate it and wait for it to become primary - ./mongo --eval "if(db.isMaster().isreplicaset){rs.initiate(); assert.soon(function(){return db.isMaster().ismaster}, 'no primary')}" + # + # Note: This process is always currently started with --nojournal (not a recommended production configuration, see + # https://docs.mongodb.com/manual/tutorial/manage-journaling/#disable-journaling). + # As a result, writeConcernMajorityJournalDefault can be set to false. If this becomes configurable later + # then the correct value should be passed to rs.initiate or getCmdLineOpts needs to interrogated (but + # only after db.createUser). + ./mongo --eval "if(db.isMaster().isreplicaset){\ + rs.initiate({_id: 'test', version: 1, members: [ { _id: 0, host : 'localhost:27017' }], writeConcernMajorityJournalDefault:false});\ + assert.soon(function(){return db.isMaster().ismaster}, 'no primary');\ + }" # benchRun() authenticates against the admin db, with a user that must has admin access. # Note: This is possibly a legacy requirement from times when it would call serverStatus. @@ -114,7 +124,10 @@ functions: ./mongo --eval "db.createUser({user: 'admin', pwd: 'password', roles:\ [ { role: 'root', db: 'admin' } ] })"\ admin - echo "MONGOD STARTED." + + # print the replset config unless this is a standalone + ./mongo --eval "if( db.isMaster().hosts ) { printjson(rs.config()); }" --username admin --password password admin + echo "MONGOD STARTED." "analyze": - command: shell.exec params: -- cgit v1.2.1