summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJim OLeary <jim.oleary@gmail.com>2017-06-21 16:07:42 +0100
committerJim OLeary <jim.oleary@gmail.com>2017-06-23 08:45:32 +0100
commite5bc4afbe4529e54dc658bf724e51a8e94dde1b3 (patch)
treed85566dfec975c8ba1aeb4cc006db90072ae4ffb /etc
parent0869941cc2d7391ba41e6e5d1f7aceb6df4f6573 (diff)
downloadmongo-e5bc4afbe4529e54dc658bf724e51a8e94dde1b3.tar.gz
SERVER-29680 microbenchmarks set writeConcernMajorityJournalDefault=false in rs.initiate()
(cherry picked from commit 49393e7e445c68e0e6a2a9da26179d9413d926b7)
Diffstat (limited to 'etc')
-rw-r--r--etc/perf.yml17
1 files changed, 15 insertions, 2 deletions
diff --git a/etc/perf.yml b/etc/perf.yml
index 78573f05c31..c67a73a0d08 100644
--- a/etc/perf.yml
+++ b/etc/perf.yml
@@ -95,8 +95,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.
@@ -104,7 +114,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: