0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-15535 wait for master after reconfig

This commit is contained in:
Eric Milkie 2014-10-10 09:33:01 -04:00
parent 07a1b19278
commit 20fcd68435

View File

@ -57,9 +57,10 @@ var slave = rt.add();
print ("initiation complete!");
var sc = slave.getDB( 'd' )[ 'c' ];
slave.setSlaveOk();
master = rt.getMaster();
print ("updating and deleting documents");
bulk = mdc.initializeUnorderedBulkOp();
bulk = master.getDB('d')['c'].initializeUnorderedBulkOp();
for (i = doccount*4; i > doccount; --i) {
bulk.find({ _id: i }).update({ $inc: { x: 1 }});
bulk.find({ _id: i }).remove();