commit b8d52f1197c7af1a868fb28a429bcbb7dbc07096 Author: Patrick Collison Date: Sun Sep 11 15:57:55 2011 -0700 slaveok -> slaveOk for consistency diff --git a/db/cloner.cpp b/db/cloner.cpp index 8956133..bf8cc41 100644 --- a/db/cloner.cpp +++ b/db/cloner.cpp @@ -468,7 +468,7 @@ namespace mongo { were to clone it would get a different point-in-time and not match. */ return cloneFrom(from.c_str(), errmsg, dbname, - /*logForReplication=*/!fromRepl, /*slaveok*/false, /*usereplauth*/false, /*snapshot*/true, /*mayYield*/true, /*mayBeInterrupted*/false); + /*logForReplication=*/!fromRepl, /*slaveOk*/false, /*usereplauth*/false, /*snapshot*/true, /*mayYield*/true, /*mayBeInterrupted*/false); } } cmdclone; diff --git a/db/commands.h b/db/commands.h index c186218..cf8fd0b 100644 --- a/db/commands.h +++ b/db/commands.h @@ -75,7 +75,7 @@ namespace mongo { virtual bool slaveOk() const = 0; /* Return true if the client force a command to be run on a slave by - turning on the 'slaveok' option in the command query. + turning on the 'slaveOk' option in the command query. */ virtual bool slaveOverrideOk() { return false; diff --git a/db/oplogreader.h b/db/oplogreader.h index 01f76f4..bfb0ccf 100644 --- a/db/oplogreader.h +++ b/db/oplogreader.h @@ -70,7 +70,7 @@ namespace mongo { log(2) << "repl: " << ns << ".find(" << query.toString() << ')' << endl; cursor.reset( _conn->query( ns, query, 0, 0, fields, QueryOption_CursorTailable | QueryOption_SlaveOk | QueryOption_OplogReplay | - /* TODO: slaveok maybe shouldn't use? */ + /* TODO: slaveOk maybe shouldn't use? */ QueryOption_AwaitData ).release() ); } diff --git a/db/pdfile.cpp b/db/pdfile.cpp index ac7731a..ca04726 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -2097,7 +2097,7 @@ namespace mongo { assert( ctx.justCreated() ); res = cloneFrom(localhost.c_str(), errmsg, dbName, - /*logForReplication=*/false, /*slaveok*/false, /*replauth*/false, + /*logForReplication=*/false, /*slaveOk*/false, /*replauth*/false, /*snapshot*/false, /*mayYield*/false, /*mayBeInterrupted*/true); Database::closeDatabase( dbName, reservedPathString.c_str() ); } diff --git a/db/repl.cpp b/db/repl.cpp index a18d725..74e99da 100644 --- a/db/repl.cpp +++ b/db/repl.cpp @@ -490,7 +490,7 @@ namespace mongo { ReplInfo r("resync: cloning a database"); string errmsg; int errCode = 0; - bool ok = cloneFrom(hostName.c_str(), errmsg, cc().database()->name, false, /*slaveok*/ true, /*replauth*/ true, /*snapshot*/false, /*mayYield*/true, /*mayBeInterrupted*/false, &errCode); + bool ok = cloneFrom(hostName.c_str(), errmsg, cc().database()->name, false, /*slaveOk*/ true, /*replauth*/ true, /*snapshot*/false, /*mayYield*/true, /*mayBeInterrupted*/false, &errCode); if ( !ok ) { if ( errCode == DatabaseDifferCaseCode ) { resyncDrop( db.c_str(), "internal" ); diff --git a/db/replutil.h b/db/replutil.h index f2bea23..8276405 100644 --- a/db/replutil.h +++ b/db/replutil.h @@ -81,7 +81,7 @@ namespace mongo { if( replSet ) { /* todo: speed up the secondary case. as written here there are 2 mutex entries, it can b 1. */ if( isMaster() ) return; - uassert(13435, "not master and slaveok=false", pq.hasOption(QueryOption_SlaveOk)); + uassert(13435, "not master and slaveOk=false", pq.hasOption(QueryOption_SlaveOk)); uassert(13436, "not master or secondary, can't read", theReplSet && theReplSet->isSecondary() ); } else { diff --git a/docs/errors.md b/docs/errors.md index 3da8e2c..7fd2a8b 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -1001,7 +1001,7 @@ db/repl_block.cpp db/replutil.h ---- * 10107 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L76) not master -* 13435 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L84) not master and slaveok=false +* 13435 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L84) not master and slaveOk=false * 13436 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L85) not master or secondary, can't read diff --git a/jstests/replsets/stale_clustered.js b/jstests/replsets/stale_clustered.js index 457231e..916a064 100644 --- a/jstests/replsets/stale_clustered.js +++ b/jstests/replsets/stale_clustered.js @@ -79,7 +79,7 @@ prt("6: stop non-overflowed secondary") rsA.stop( goodSec, undefined, true ) -prt("7: check our regular and slaveok query") +prt("7: check our regular and slaveOk query") assert.eq( coll.find().itcount(), collSOk.find().itcount() ) @@ -91,7 +91,7 @@ prt("9: wait for recovery") rsA.waitForState( rsA.getSecondaries(), rsA.SECONDARY, 5 * 60 * 1000 ) -prt("10: check our regular and slaveok query") +prt("10: check our regular and slaveOk query") assert.eq( coll.find().itcount(), collSOk.find().itcount() )