Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

slaveok -> slaveOk for consistency

  • Loading branch information...
commit b8d52f1197c7af1a868fb28a429bcbb7dbc07096 1 parent df2bdb7
Patrick Collison authored
2  db/cloner.cpp
@@ -468,7 +468,7 @@ namespace mongo {
468 468 were to clone it would get a different point-in-time and not match.
469 469 */
470 470 return cloneFrom(from.c_str(), errmsg, dbname,
471   - /*logForReplication=*/!fromRepl, /*slaveok*/false, /*usereplauth*/false, /*snapshot*/true, /*mayYield*/true, /*mayBeInterrupted*/false);
  471 + /*logForReplication=*/!fromRepl, /*slaveOk*/false, /*usereplauth*/false, /*snapshot*/true, /*mayYield*/true, /*mayBeInterrupted*/false);
472 472 }
473 473 } cmdclone;
474 474
2  db/commands.h
@@ -75,7 +75,7 @@ namespace mongo {
75 75 virtual bool slaveOk() const = 0;
76 76
77 77 /* Return true if the client force a command to be run on a slave by
78   - turning on the 'slaveok' option in the command query.
  78 + turning on the 'slaveOk' option in the command query.
79 79 */
80 80 virtual bool slaveOverrideOk() {
81 81 return false;
2  db/oplogreader.h
@@ -70,7 +70,7 @@ namespace mongo {
70 70 log(2) << "repl: " << ns << ".find(" << query.toString() << ')' << endl;
71 71 cursor.reset( _conn->query( ns, query, 0, 0, fields,
72 72 QueryOption_CursorTailable | QueryOption_SlaveOk | QueryOption_OplogReplay |
73   - /* TODO: slaveok maybe shouldn't use? */
  73 + /* TODO: slaveOk maybe shouldn't use? */
74 74 QueryOption_AwaitData
75 75 ).release() );
76 76 }
2  db/pdfile.cpp
@@ -2097,7 +2097,7 @@ namespace mongo {
2097 2097 assert( ctx.justCreated() );
2098 2098
2099 2099 res = cloneFrom(localhost.c_str(), errmsg, dbName,
2100   - /*logForReplication=*/false, /*slaveok*/false, /*replauth*/false,
  2100 + /*logForReplication=*/false, /*slaveOk*/false, /*replauth*/false,
2101 2101 /*snapshot*/false, /*mayYield*/false, /*mayBeInterrupted*/true);
2102 2102 Database::closeDatabase( dbName, reservedPathString.c_str() );
2103 2103 }
2  db/repl.cpp
@@ -490,7 +490,7 @@ namespace mongo {
490 490 ReplInfo r("resync: cloning a database");
491 491 string errmsg;
492 492 int errCode = 0;
493   - bool ok = cloneFrom(hostName.c_str(), errmsg, cc().database()->name, false, /*slaveok*/ true, /*replauth*/ true, /*snapshot*/false, /*mayYield*/true, /*mayBeInterrupted*/false, &errCode);
  493 + bool ok = cloneFrom(hostName.c_str(), errmsg, cc().database()->name, false, /*slaveOk*/ true, /*replauth*/ true, /*snapshot*/false, /*mayYield*/true, /*mayBeInterrupted*/false, &errCode);
494 494 if ( !ok ) {
495 495 if ( errCode == DatabaseDifferCaseCode ) {
496 496 resyncDrop( db.c_str(), "internal" );
2  db/replutil.h
@@ -81,7 +81,7 @@ namespace mongo {
81 81 if( replSet ) {
82 82 /* todo: speed up the secondary case. as written here there are 2 mutex entries, it can b 1. */
83 83 if( isMaster() ) return;
84   - uassert(13435, "not master and slaveok=false", pq.hasOption(QueryOption_SlaveOk));
  84 + uassert(13435, "not master and slaveOk=false", pq.hasOption(QueryOption_SlaveOk));
85 85 uassert(13436, "not master or secondary, can't read", theReplSet && theReplSet->isSecondary() );
86 86 }
87 87 else {
2  docs/errors.md
Source Rendered
@@ -1001,7 +1001,7 @@ db/repl_block.cpp
1001 1001 db/replutil.h
1002 1002 ----
1003 1003 * 10107 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L76) not master
1004   -* 13435 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L84) not master and slaveok=false
  1004 +* 13435 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L84) not master and slaveOk=false
1005 1005 * 13436 [code](http://github.com/mongodb/mongo/blob/master/db/replutil.h#L85) not master or secondary, can't read
1006 1006
1007 1007
4 jstests/replsets/stale_clustered.js
@@ -79,7 +79,7 @@ prt("6: stop non-overflowed secondary")
79 79
80 80 rsA.stop( goodSec, undefined, true )
81 81
82   -prt("7: check our regular and slaveok query")
  82 +prt("7: check our regular and slaveOk query")
83 83
84 84 assert.eq( coll.find().itcount(), collSOk.find().itcount() )
85 85
@@ -91,7 +91,7 @@ prt("9: wait for recovery")
91 91
92 92 rsA.waitForState( rsA.getSecondaries(), rsA.SECONDARY, 5 * 60 * 1000 )
93 93
94   -prt("10: check our regular and slaveok query")
  94 +prt("10: check our regular and slaveOk query")
95 95
96 96 assert.eq( coll.find().itcount(), collSOk.find().itcount() )
97 97

0 comments on commit b8d52f1

Please sign in to comment.
Something went wrong with that request. Please try again.