diff options
author | Pascal Borreli <pascal@borreli.com> | 2012-10-14 03:57:18 +0000 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-10-14 12:48:21 -0400 |
commit | 39e0e4af9ed4a6e8d2e158c699a89a2281c1b8bb (patch) | |
tree | f1ea7210c6f52f0ac15a56109f009706ebe414c7 /src/mongo | |
parent | 918a14c42a9156086578c28e1a7311c564aac2b3 (diff) | |
download | mongo-39e0e4af9ed4a6e8d2e158c699a89a2281c1b8bb.tar.gz |
Fixed typos
Signed-off-by: Tad Marshall <tad@10gen.com>
Diffstat (limited to 'src/mongo')
72 files changed, 97 insertions, 97 deletions
diff --git a/src/mongo/base/global_initializer.cpp b/src/mongo/base/global_initializer.cpp index 4b1b8726bc2..0fb060f64b1 100644 --- a/src/mongo/base/global_initializer.cpp +++ b/src/mongo/base/global_initializer.cpp @@ -33,4 +33,4 @@ namespace { } // namespace -} // namesapce mongo +} // namespace mongo diff --git a/src/mongo/base/global_initializer_registerer.cpp b/src/mongo/base/global_initializer_registerer.cpp index 43443554403..91b83203e40 100644 --- a/src/mongo/base/global_initializer_registerer.cpp +++ b/src/mongo/base/global_initializer_registerer.cpp @@ -40,4 +40,4 @@ namespace mongo { } } -} // namesapce mongo +} // namespace mongo diff --git a/src/mongo/base/initializer_dependency_graph.h b/src/mongo/base/initializer_dependency_graph.h index 3c841564c97..f12a6e7554b 100644 --- a/src/mongo/base/initializer_dependency_graph.h +++ b/src/mongo/base/initializer_dependency_graph.h @@ -35,7 +35,7 @@ namespace mongo { * * Instances of this class are used in two phases. In the first phase, the graph is constructed * by repeated calls to addInitializer(). In the second phase, a user calls the topSort() - * method to produce an initialization order that respects the dependences among operations, and + * method to produce an initialization order that respects the dependencies among operations, and * then uses the getInitializerFunction() to get the behavior function for each operation, in * turn. * @@ -53,8 +53,8 @@ namespace mongo { /** * Add a new initializer node, named "name", to the dependency graph, with the given - * behavior, "fn", and the given "prerequisites" (input dependences) and "dependents" - * (output dependences). + * behavior, "fn", and the given "prerequisites" (input dependencies) and "dependents" + * (output dependencies). * * If "!fn" (fn is NULL in function pointer parlance), returns status with code * ErrorCodes::badValue. If "name" is a duplicate of a name already present in the graph, diff --git a/src/mongo/base/make_string_vector.cpp b/src/mongo/base/make_string_vector.cpp index 9634f9499cd..1865f19b859 100644 --- a/src/mongo/base/make_string_vector.cpp +++ b/src/mongo/base/make_string_vector.cpp @@ -36,4 +36,4 @@ namespace mongo { return result; } -} // namspace mongo +} // namespace mongo diff --git a/src/mongo/client/authentication_table.h b/src/mongo/client/authentication_table.h index 20cb8c4fdba..ddab123922d 100644 --- a/src/mongo/client/authentication_table.h +++ b/src/mongo/client/authentication_table.h @@ -46,7 +46,7 @@ namespace mongo { Auth getAuthForDb( const std::string& dbname ) const; - // Takes the authentication state from the given BSONObj, replcacing whatever state it had. + // Takes the authentication state from the given BSONObj, replacing whatever state it had. void setFromBSON( const BSONObj& obj ); BSONObj toBSON() const; diff --git a/src/mongo/client/clientOnly.cpp b/src/mongo/client/clientOnly.cpp index 0c7ff01d0cb..12437aaf311 100644 --- a/src/mongo/client/clientOnly.cpp +++ b/src/mongo/client/clientOnly.cpp @@ -11,7 +11,7 @@ * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing puermissions and + * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/src/mongo/client/connpool.h b/src/mongo/client/connpool.h index b785e9d04f6..ba6abf1bf87 100644 --- a/src/mongo/client/connpool.h +++ b/src/mongo/client/connpool.h @@ -99,7 +99,7 @@ namespace mongo { Generally, use ScopedDbConnection and do not call these directly. This class, so far, is suitable for use with unauthenticated connections. - Support for authenticated connections requires some adjustements: please + Support for authenticated connections requires some adjustments: please request... Usage: diff --git a/src/mongo/client/constants.h b/src/mongo/client/constants.h index 54f3fd216f2..3df497545d1 100644 --- a/src/mongo/client/constants.h +++ b/src/mongo/client/constants.h @@ -16,7 +16,7 @@ namespace mongo { /* Have to update config from the server, usually $err is also set */ ResultFlag_ShardConfigStale = 4, - /* for backward compatability: this let's us know the server supports + /* for backward compatibility: this let's us know the server supports the QueryOption_AwaitData option. if it doesn't, a repl slave client should sleep a little between getMore's. */ diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp index 657731c40f0..43e21a3001b 100644 --- a/src/mongo/client/dbclient_rs.cpp +++ b/src/mongo/client/dbclient_rs.cpp @@ -1507,7 +1507,7 @@ namespace mongo { } void DBClientReplicaSet::killCursor( long long cursorID ) { - // we should neve call killCursor on a replica set conncetion + // we should never call killCursor on a replica set connection // since we don't know which server it belongs to // can't assume master because of slave ok // and can have a cursor survive a master change diff --git a/src/mongo/client/dbclient_rs.h b/src/mongo/client/dbclient_rs.h index 79d604384d8..f3c642d00be 100644 --- a/src/mongo/client/dbclient_rs.h +++ b/src/mongo/client/dbclient_rs.h @@ -38,7 +38,7 @@ namespace mongo { * manages state about a replica set for client * keeps tabs on whose master and what slaves are up * can hand a slave to someone for SLAVE_OK - * one instace per process per replica set + * one instance per process per replica set * TODO: we might be able to use a regular Node * to avoid _lock */ class ReplicaSetMonitor { diff --git a/src/mongo/client/dbclientinterface.h b/src/mongo/client/dbclientinterface.h index dbbac79b966..aa313fe2cb9 100644 --- a/src/mongo/client/dbclientinterface.h +++ b/src/mongo/client/dbclientinterface.h @@ -56,7 +56,7 @@ namespace mongo { // an extended period of time. QueryOption_OplogReplay = 1 << 3, - /** The server normally times out idle cursors after an inactivy period to prevent excess memory uses + /** The server normally times out idle cursors after an inactivity period to prevent excess memory uses Set this option to prevent that. */ QueryOption_NoCursorTimeout = 1 << 4, diff --git a/src/mongo/client/distlock.h b/src/mongo/client/distlock.h index 92df434df1a..4e227393c4c 100644 --- a/src/mongo/client/distlock.h +++ b/src/mongo/client/distlock.h @@ -61,7 +61,7 @@ namespace mongo { * unique name across the system (e.g., "balancer"). A lock is taken by writing a document in the configdb's locks * collection with that name. * - * To be maintained, each taken lock needs to be revalidaded ("pinged") within a pre-established amount of time. This + * To be maintained, each taken lock needs to be revalidated ("pinged") within a pre-established amount of time. This * class does this maintenance automatically once a DistributedLock object was constructed. */ class DistributedLock { diff --git a/src/mongo/client/parallel.cpp b/src/mongo/client/parallel.cpp index 531445f83a2..9158d3eeced 100644 --- a/src/mongo/client/parallel.cpp +++ b/src/mongo/client/parallel.cpp @@ -1639,7 +1639,7 @@ namespace mongo { } } catch ( std::exception& e ) { - error() << "Future::spawnComand (part 1) exception: " << e.what() << endl; + error() << "Future::spawnCommand (part 1) exception: " << e.what() << endl; _ok = false; _done = true; } @@ -1678,13 +1678,13 @@ namespace mongo { if( staleNS.size() == 0 ) staleNS = _db; if( i >= maxRetries ){ - error() << "Future::spawnComand (part 2) stale config exception" << causedBy( e ) << endl; + error() << "Future::spawnCommand (part 2) stale config exception" << causedBy( e ) << endl; throw e; } if( i >= maxRetries / 2 ){ if( ! versionManager.forceRemoteCheckShardVersionCB( staleNS ) ){ - error() << "Future::spawnComand (part 2) no config detected" << causedBy( e ) << endl; + error() << "Future::spawnCommand (part 2) no config detected" << causedBy( e ) << endl; throw e; } } @@ -1708,7 +1708,7 @@ namespace mongo { continue; } catch ( std::exception& e ) { - error() << "Future::spawnComand (part 2) exception: " << causedBy( e ) << endl; + error() << "Future::spawnCommand (part 2) exception: " << causedBy( e ) << endl; break; } diff --git a/src/mongo/client/parallel.h b/src/mongo/client/parallel.h index d70b5479abd..8114d817fd3 100644 --- a/src/mongo/client/parallel.h +++ b/src/mongo/client/parallel.h @@ -66,7 +66,7 @@ namespace mongo { /** * this is a cursor that works over a set of servers - * can be used in serial/paralellel as controlled by sub classes + * can be used in serial/parallel as controlled by sub classes */ class ClusteredCursor { public: diff --git a/src/mongo/db/btree.h b/src/mongo/db/btree.h index e7adf823995..63010f8caf7 100644 --- a/src/mongo/db/btree.h +++ b/src/mongo/db/btree.h @@ -404,7 +404,7 @@ namespace mongo { /** * Preconditions: * - key / recordLoc are > all existing keys - * - The keys in prevChild and their descendents are between all existing + * - The keys in prevChild and their descendants are between all existing * keys and 'key'. * Postconditions: * - If there is space for key without packing, it is inserted as the @@ -607,7 +607,7 @@ namespace mongo { * so assignment of const is sometimes nonideal. * * TODO There are several cases in which the 'this' pointer is invalidated - * as a result of deallocation. A seperate class representing a btree would + * as a result of deallocation. A separate class representing a btree would * alleviate some fragile cases where the implementation must currently * behave correctly if the 'this' pointer is suddenly invalidated by a * callee. diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h index 69e4467d2f9..5498bd84acd 100644 --- a/src/mongo/db/clientcursor.h +++ b/src/mongo/db/clientcursor.h @@ -383,7 +383,7 @@ namespace mongo { private: // methods - // cursors normally timeout after an inactivy period to prevent excess memory use + // cursors normally timeout after an inactivity period to prevent excess memory use // setting this prevents timeout of the cursor in question. void noTimeout() { _pinValue++; } diff --git a/src/mongo/db/commands/cpuprofile.cpp b/src/mongo/db/commands/cpuprofile.cpp index 6d551bee77a..cc70c54ec5e 100644 --- a/src/mongo/db/commands/cpuprofile.cpp +++ b/src/mongo/db/commands/cpuprofile.cpp @@ -18,7 +18,7 @@ * /usr/local: * * scons --release --use-cpu-profiler \ - * --cpppath=/usr/local/include --libpath=/usr/loca/lib + * --cpppath=/usr/local/include --libpath=/usr/local/lib */ #include "google/profiler.h" diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index ea9f47333c9..6bdea093261 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -17,7 +17,7 @@ /* SHARDING: I believe this file is for mongod only. - See s/commnands_public.cpp for mongos. + See s/commands_public.cpp for mongos. */ #include "mongo/pch.h" diff --git a/src/mongo/db/diskloc.h b/src/mongo/db/diskloc.h index 0b7e3334312..cf70956c299 100644 --- a/src/mongo/db/diskloc.h +++ b/src/mongo/db/diskloc.h @@ -40,7 +40,7 @@ namespace mongo { (such as adding a virtual function) */ class DiskLoc { - int _a; // this will be volume, file #, etsc. but is a logical value could be anything depending on storage engine + int _a; // this will be volume, file #, etc. but is a logical value could be anything depending on storage engine int ofs; public: diff --git a/src/mongo/db/dur.h b/src/mongo/db/dur.h index 9914264c83e..8c98ccff4f2 100644 --- a/src/mongo/db/dur.h +++ b/src/mongo/db/dur.h @@ -95,7 +95,7 @@ namespace mongo { /** Commit if enough bytes have been modified. Current threshold is 50MB - The idea is that long running write operations that dont yield + The idea is that long running write operations that don't yield (like creating an index or update with $atomic) can call this whenever the db is in a sane state and it will prevent commits from growing too large. diff --git a/src/mongo/db/dur_preplogbuffer.cpp b/src/mongo/db/dur_preplogbuffer.cpp index 5ad925badac..a6622c19e52 100644 --- a/src/mongo/db/dur_preplogbuffer.cpp +++ b/src/mongo/db/dur_preplogbuffer.cpp @@ -82,7 +82,7 @@ namespace mongo { */ JEntry e; - e.len = min(i->length(), (unsigned)(mmf->length() - ofs)); //dont write past end of file + e.len = min(i->length(), (unsigned)(mmf->length() - ofs)); //don't write past end of file verify( ofs <= 0x80000000 ); e.ofs = (unsigned) ofs; e.setFileNo( mmf->fileSuffixNo() ); diff --git a/src/mongo/db/dur_recover.cpp b/src/mongo/db/dur_recover.cpp index 110ebfecf11..33d5a72bad8 100644 --- a/src/mongo/db/dur_recover.cpp +++ b/src/mongo/db/dur_recover.cpp @@ -58,7 +58,7 @@ namespace mongo { // might be a pointer into mmaped Journal file const char *dbName; - // thse are pointers into the memory mapped journal file + // those are pointers into the memory mapped journal file const JEntry *e; // local db sentinel is already parsed out here into dbName // if not one of the two simple JEntry's above, this is the operation: @@ -88,7 +88,7 @@ namespace mongo { if( i != m.begin() && m.count(i->first - 1) == 0 ) { uasserted(13532, str::stream() << "unexpected file in journal directory " << dir.string() - << " : " << boost::filesystem::path(i->second).leaf().string() << " : can't find its preceeding file"); + << " : " << boost::filesystem::path(i->second).leaf().string() << " : can't find its preceding file"); } files.push_back(i->second); } diff --git a/src/mongo/db/json.cpp b/src/mongo/db/json.cpp index 7fff6a30996..9a7185863ec 100644 --- a/src/mongo/db/json.cpp +++ b/src/mongo/db/json.cpp @@ -482,7 +482,7 @@ namespace mongo { ObjectBuilder &b; }; -// One gotcha with this parsing library is probably best ilustrated with an +// One gotcha with this parsing library is probably best illustrated with an // example. Say we have a production like this: // z = ( ch_p( 'a' )[ foo ] >> ch_p( 'b' ) ) | ( ch_p( 'a' )[ foo ] >> ch_p( 'c' ) ); // On input "ac", action foo() will be called twice -- once as the parser tries diff --git a/src/mongo/db/memconcept.cpp b/src/mongo/db/memconcept.cpp index 3d3ebe72032..c5be0b8ffdd 100644 --- a/src/mongo/db/memconcept.cpp +++ b/src/mongo/db/memconcept.cpp @@ -100,7 +100,7 @@ namespace mongo { C &node = map.find(p); node.p = p; node.c = concept::err; - // len is not used currenntly. hmmm. + // len is not used currently. hmmm. } #endif diff --git a/src/mongo/db/namespace_details.h b/src/mongo/db/namespace_details.h index f448be9da0a..043c5a76d7e 100644 --- a/src/mongo/db/namespace_details.h +++ b/src/mongo/db/namespace_details.h @@ -421,7 +421,7 @@ namespace mongo { todo: cleanup code, need abstractions and separation */ - // todo: multiple db's with the same name (repairDatbase) is not handled herein. that may be + // todo: multiple db's with the same name (repairDatabase) is not handled herein. that may be // the way to go, if not used by repair, but need some sort of enforcement / asserts. class NamespaceDetailsTransient : boost::noncopyable { BOOST_STATIC_ASSERT( sizeof(NamespaceDetails) == 496 ); diff --git a/src/mongo/db/nonce.cpp b/src/mongo/db/nonce.cpp index 28b64e8c25c..ca794a98852 100644 --- a/src/mongo/db/nonce.cpp +++ b/src/mongo/db/nonce.cpp @@ -80,7 +80,7 @@ namespace mongo { } nonce64 Security::getNonceDuringInit() { - // the mutex might not be inited yet. init phase should be one thread anyway (hopefully we don't spawn threads therein) + // the mutex might not be initialized yet. init phase should be one thread anyway (hopefully we don't spawn threads therein) if( !security._initialized ) security.init(); return security.__getNonce(); diff --git a/src/mongo/db/ops/update_internal.h b/src/mongo/db/ops/update_internal.h index 1b8f27bb700..e2d1d4754ef 100644 --- a/src/mongo/db/ops/update_internal.h +++ b/src/mongo/db/ops/update_internal.h @@ -75,7 +75,7 @@ namespace mongo { } /** - * @param in incrememnts the actual value inside in + * @param in increments the actual value inside in */ void incrementMe( BSONElement& in ) const { BSONElementManipulator manip( in ); @@ -347,7 +347,7 @@ namespace mongo { /** * creates a ModSetState suitable for operation on obj - * doesn't change or modify this ModSet or any underying Mod + * doesn't change or modify this ModSet or any underlying Mod */ auto_ptr<ModSetState> prepare( const BSONObj& obj ) const; diff --git a/src/mongo/db/pipeline/document.h b/src/mongo/db/pipeline/document.h index 026ab85e245..3db7e9dfebf 100755 --- a/src/mongo/db/pipeline/document.h +++ b/src/mongo/db/pipeline/document.h @@ -85,7 +85,7 @@ namespace mongo { Add the given field to the Document. BSON documents' fields are ordered; the new Field will be - appened to the current list of fields. + appended to the current list of fields. It is an error to add a field that has the same name as another field. diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp index 045ff4c3726..e1f033192a9 100755 --- a/src/mongo/db/pipeline/document_source.cpp +++ b/src/mongo/db/pipeline/document_source.cpp @@ -57,7 +57,7 @@ namespace mongo { void DocumentSource::dispose() { if ( pSource ) { - // This is requried for the DocumentSourceCursor to release its read lock, see + // This is required for the DocumentSourceCursor to release its read lock, see // SERVER-6123. pSource->dispose(); } diff --git a/src/mongo/db/pipeline/document_source_limit.cpp b/src/mongo/db/pipeline/document_source_limit.cpp index 8bbcaff2113..422fceb5e98 100644 --- a/src/mongo/db/pipeline/document_source_limit.cpp +++ b/src/mongo/db/pipeline/document_source_limit.cpp @@ -68,7 +68,7 @@ namespace mongo { pCurrent.reset(); - // This is requried for the DocumentSourceCursor to release its read lock, see + // This is required for the DocumentSourceCursor to release its read lock, see // SERVER-6123. pSource->dispose(); diff --git a/src/mongo/db/pipeline/document_source_match.cpp b/src/mongo/db/pipeline/document_source_match.cpp index c444cec3abe..03006c1e043 100644 --- a/src/mongo/db/pipeline/document_source_match.cpp +++ b/src/mongo/db/pipeline/document_source_match.cpp @@ -66,7 +66,7 @@ namespace mongo { // can't use the Matcher API because this would segfault the constructor uassert(16395, "$where is not allowed inside of a $match aggregation expression", ! str::equals(e.fieldName(), "$where")); - // geo breaks if it is not the first portion of the pipline + // geo breaks if it is not the first portion of the pipeline uassert(16424, "$near is not allowed inside of a $match aggregation expression", ! str::equals(e.fieldName(), "$near")); uassert(16425, "$within is not allowed inside of a $match aggregation expression", diff --git a/src/mongo/db/pipeline/document_source_unwind.cpp b/src/mongo/db/pipeline/document_source_unwind.cpp index 16e431c02d3..848251b350a 100755 --- a/src/mongo/db/pipeline/document_source_unwind.cpp +++ b/src/mongo/db/pipeline/document_source_unwind.cpp @@ -39,7 +39,7 @@ namespace mongo { */ void advance(); /** - * @return the current document unwound from the document provided to resetDocuemnt(), using + * @return the current document unwound from the document provided to resetDocument(), using * the current value in the array located at the provided unwindPath. But @return * intrusive_ptr<Document>() if resetDocument() has not been called or the results to unwind * have been exhausted. diff --git a/src/mongo/db/pipeline/expression.h b/src/mongo/db/pipeline/expression.h index adbfc1826dc..c9f13990854 100755 --- a/src/mongo/db/pipeline/expression.h +++ b/src/mongo/db/pipeline/expression.h @@ -398,7 +398,7 @@ namespace mongo { Provide for conformance with the uniform function pointer signature required for parsing. - These create a particular comparision operand, without any + These create a particular comparison operand, without any operands. Those must be added via ExpressionNary::addOperand(). */ static intrusive_ptr<ExpressionNary> createCmp(); diff --git a/src/mongo/db/pipeline/pipeline.cpp b/src/mongo/db/pipeline/pipeline.cpp index eae6b87e4f8..7915fcf9564 100644 --- a/src/mongo/db/pipeline/pipeline.cpp +++ b/src/mongo/db/pipeline/pipeline.cpp @@ -438,7 +438,7 @@ namespace mongo { For now, this should be a BSON source array. In future, we might have a more clever way of getting this, when we have more interleaved fetching between shards. The DocumentSource - interface will have to change to accomodate that. + interface will have to change to accommodate that. */ DocumentSourceBsonArray *pSourceBsonArray = dynamic_cast<DocumentSourceBsonArray *>(pInputSource.get()); diff --git a/src/mongo/db/projection.cpp b/src/mongo/db/projection.cpp index 6c598f6daa7..ad875605916 100644 --- a/src/mongo/db/projection.cpp +++ b/src/mongo/db/projection.cpp @@ -62,7 +62,7 @@ namespace mongo { } } else if ( mongoutils::str::equals( e2.fieldName(), "$elemMatch" ) ) { - // validate $elemMatch arguments and dependancies + // validate $elemMatch arguments and dependencies uassert( 16342, "elemMatch: invalid argument. object required.", e2.type() == Object ); uassert( 16343, "Cannot specify positional operator and $elemMatch" diff --git a/src/mongo/db/record.cpp b/src/mongo/db/record.cpp index 91724af6a54..83a65402432 100644 --- a/src/mongo/db/record.cpp +++ b/src/mongo/db/record.cpp @@ -53,7 +53,7 @@ namespace mongo { /** * simple hash map for region -> status - * this constitures a single region of time + * this constitutes a single region of time * it does chaining, but very short chains */ class Slice { diff --git a/src/mongo/db/repl.cpp b/src/mongo/db/repl.cpp index 59c8807bd2a..cd5b56e44ee 100644 --- a/src/mongo/db/repl.cpp +++ b/src/mongo/db/repl.cpp @@ -1354,7 +1354,7 @@ namespace mongo { if( s == 1 ) { if( nApplied == 0 ) s = 2; else if( nApplied > 100 ) { - // sleep very little - just enought that we aren't truly hammering master + // sleep very little - just enough that we aren't truly hammering master sleepmillis(75); s = 0; } diff --git a/src/mongo/db/repl/rs_initiate.cpp b/src/mongo/db/repl/rs_initiate.cpp index 778d4c0a8d5..23bc334d35b 100644 --- a/src/mongo/db/repl/rs_initiate.cpp +++ b/src/mongo/db/repl/rs_initiate.cpp @@ -93,7 +93,7 @@ namespace mongo { uasserted(13145, "set name does not match the set name host " + i->h.toString() + " expects"); if( *res.getStringField("set") ) { if( cfg.version <= 1 ) { - // this was to be initiation, no one shoudl be initiated already. + // this was to be initiation, no one should be initiated already. uasserted(13256, "member " + i->h.toString() + " is already initiated"); } else { diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp index c912116f9d5..77de1fba4ac 100644 --- a/src/mongo/db/repl/rs_rollback.cpp +++ b/src/mongo/db/repl/rs_rollback.cpp @@ -476,7 +476,7 @@ namespace mongo { /* can't delete from a capped collection - so we truncate instead. if this item must go, so must all successors!!! */ try { - /** todo: IIRC cappedTrunateAfter does not handle completely empty. todo. */ + /** todo: IIRC cappedTruncateAfter does not handle completely empty. todo. */ // this will crazy slow if no _id index. long long start = Listener::getElapsedTimeMillis(); DiskLoc loc = Helpers::findOne(d.ns, pattern, false); @@ -608,8 +608,8 @@ namespace mongo { } if( state().secondary() ) { - /* by doing this, we will not service reads (return an error as we aren't in secondary staate. - that perhaps is moot becasue of the write lock above, but that write lock probably gets deferred + /* by doing this, we will not service reads (return an error as we aren't in secondary state. + that perhaps is moot because of the write lock above, but that write lock probably gets deferred or removed or yielded later anyway. also, this is better for status reporting - we know what is happening. diff --git a/src/mongo/db/repl/rs_sync.h b/src/mongo/db/repl/rs_sync.h index da0a66069d9..90e48f0c9e5 100644 --- a/src/mongo/db/repl/rs_sync.h +++ b/src/mongo/db/repl/rs_sync.h @@ -45,7 +45,7 @@ namespace replset { * batching, this may end up applying ops beyond minValidObj's ts. * * @param applyGTEObj the op to start replicating at. This is actually not used except in - * comparision to minValidObj: the background sync thread keeps its own + * comparison to minValidObj: the background sync thread keeps its own * record of where we're synced to and starts providing ops from that * point. * @param minValidObj the op to finish syncing at. This function cannot return (other than diff --git a/src/mongo/dbtests/accumulatortests.cpp b/src/mongo/dbtests/accumulatortests.cpp index f42ff68abec..6c329962740 100644 --- a/src/mongo/dbtests/accumulatortests.cpp +++ b/src/mongo/dbtests/accumulatortests.cpp @@ -728,7 +728,7 @@ namespace AccumulatorTests { } }; - /** Two ints nagative overflow. */ + /** Two ints negative overflow. */ class IntIntNegativeOverflow : public TypeConversionBase { BSONObj summand1() { return BSON( "d" << -numeric_limits<int>::max() ); } BSONObj summand2() { return BSON( "d" << -10 ); } diff --git a/src/mongo/dbtests/documentsourcetests.cpp b/src/mongo/dbtests/documentsourcetests.cpp index d0734bc7066..bd031a53dc0 100644 --- a/src/mongo/dbtests/documentsourcetests.cpp +++ b/src/mongo/dbtests/documentsourcetests.cpp @@ -104,7 +104,7 @@ namespace DocumentSourceTests { ASSERT( Lock::isReadLocked() ); // The cursor will produce a result. ASSERT( !source()->eof() ); - // The read lock is stil held. + // The read lock is still held. ASSERT( Lock::isReadLocked() ); // The result is as expected. ASSERT_EQUALS( 1, source()->getCurrent()->getValue( "a" )->coerceToInt() ); @@ -1398,7 +1398,7 @@ namespace DocumentSourceTests { } private: /** - * Check that the BSON representation generated by the souce matches the BSON it was + * Check that the BSON representation generated by the source matches the BSON it was * created with. */ void checkBsonRepresentation( const BSONObj& spec ) { diff --git a/src/mongo/dbtests/expressiontests.cpp b/src/mongo/dbtests/expressiontests.cpp index de75958f624..26f4c04f69a 100644 --- a/src/mongo/dbtests/expressiontests.cpp +++ b/src/mongo/dbtests/expressiontests.cpp @@ -473,7 +473,7 @@ namespace ExpressionTests { } }; - /** Depdencies forwarded from nested expression. */ + /** Dependencies forwarded from nested expression. */ class Dependencies { public: void run() { diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp index 3c49331148d..2c9fbf8ec3f 100644 --- a/src/mongo/dbtests/jsobjtests.cpp +++ b/src/mongo/dbtests/jsobjtests.cpp @@ -616,7 +616,7 @@ namespace JsobjTests { ASSERT( a.woCompare(b, Ordering::make(BSONObj())) > 0 ); } { - // this is an uncompactible key: + // this is an uncompactable key: BSONObj uc1 = BSONObjBuilder().appendDate("", -50).appendCode("", "abc").obj(); BSONObj uc2 = BSONObjBuilder().appendDate("", 55).appendCode("", "abc").obj(); ASSERT( uc1.woCompare(uc2, Ordering::make(BSONObj())) < 0 ); diff --git a/src/mongo/dbtests/perf/btreeperf.cpp b/src/mongo/dbtests/perf/btreeperf.cpp index 7d68d8f5cc7..212197f76db 100644 --- a/src/mongo/dbtests/perf/btreeperf.cpp +++ b/src/mongo/dbtests/perf/btreeperf.cpp @@ -79,8 +79,8 @@ protected: * * TODO In the contexts where this class is currently used, duplicate keys are * either impossible or highly unlikely. And an occasional duplicate value will - * not much affect the procedure by wich a random element is chosen. We could - * stop checking for duplicates in push(), eliminate _set from the implementaiton, + * not much affect the procedure by which a random element is chosen. We could + * stop checking for duplicates in push(), eliminate _set from the implementation, * and potentially improve performance and memory requirements somewhat. */ template< class T > diff --git a/src/mongo/dbtests/queryoptimizercursortests.cpp b/src/mongo/dbtests/queryoptimizercursortests.cpp index 8dcb35bfc09..40e4e9bf8f1 100644 --- a/src/mongo/dbtests/queryoptimizercursortests.cpp +++ b/src/mongo/dbtests/queryoptimizercursortests.cpp @@ -1765,7 +1765,7 @@ namespace QueryOptimizerCursorTests { } }; - /** Yield with BacicCursor takeover cursor. */ + /** Yield with BasicCursor takeover cursor. */ class TakeoverBasic : public Base { public: void run() { @@ -3980,7 +3980,7 @@ namespace QueryOptimizerCursorTests { static void checkInvalidQueryAssertions() { Client::ReadContext ctx( ns() ); - // An invalid query generaing a single query plan asserts. + // An invalid query generating a single query plan asserts. BSONObj invalidQuery = fromjson( "{$and:[{$atomic:true}]}" ); assertInvalidQueryAssertion( invalidQuery ); @@ -4630,7 +4630,7 @@ namespace QueryOptimizerCursorTests { /** nYields reporting of a QueryOptimizerCursor before it enters takeover mode. */ class NYieldsAdvanceBasic : public NYieldsAdvanceBase { virtual int aValueToDelete() const { - // Before the MutiCursor takes over at 101 matches. + // Before the MultiCursor takes over at 101 matches. return 50; } }; diff --git a/src/mongo/dbtests/spin_lock_test.cpp b/src/mongo/dbtests/spin_lock_test.cpp index ed1f1ae1ca5..cd789c9fe09 100644 --- a/src/mongo/dbtests/spin_lock_test.cpp +++ b/src/mongo/dbtests/spin_lock_test.cpp @@ -1,4 +1,4 @@ -// spin_lock_test.cpp : spin_lcok.{h, cpp} unit test +// spin_lock_test.cpp : spin_lock.{h, cpp} unit test /** * Copyright (C) 2010 10gen Inc. diff --git a/src/mongo/s/balancer_policy.h b/src/mongo/s/balancer_policy.h index d4ee5a718e8..2c86cb59091 100644 --- a/src/mongo/s/balancer_policy.h +++ b/src/mongo/s/balancer_policy.h @@ -63,7 +63,7 @@ namespace mongo { bool hasTag( const string& tag ) const; /** - * @return true if a shard cannot receive any new chunks bacause it reache 'shardLimits'. + * @return true if a shard cannot receive any new chunks because it reaches 'shardLimits'. * Expects the optional fields "maxSize", can in size in MB, and "usedSize", currently used size * in MB, on 'shardLimits'. */ diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp index 741e54ed0ee..cec8cdde8ad 100644 --- a/src/mongo/s/chunk.cpp +++ b/src/mongo/s/chunk.cpp @@ -355,7 +355,7 @@ namespace mongo { return false; if ( ! getManager()->_splitHeuristics._splitTickets.tryAcquire() ) { - LOG(1) << "won't auto split becaue not enough tickets: " << getManager()->getns() << endl; + LOG(1) << "won't auto split because not enough tickets: " << getManager()->getns() << endl; return false; } TicketHolderReleaser releaser( &(getManager()->_splitHeuristics._splitTickets) ); diff --git a/src/mongo/s/d_chunk_manager.cpp b/src/mongo/s/d_chunk_manager.cpp index cd106d9d8b2..b5f890f1559 100644 --- a/src/mongo/s/d_chunk_manager.cpp +++ b/src/mongo/s/d_chunk_manager.cpp @@ -397,7 +397,7 @@ namespace mongo { // so in practice, a migrate somewhere may force this split to pick up a version that has the major portion higher // than the one that this shard has been using // - // TODO drop the uniqueness constraint and tigthen the check below so that only the minor portion of version changes + // TODO drop the uniqueness constraint and tighten the check below so that only the minor portion of version changes if ( version <= _version ) { uasserted( 14039 , str::stream() << "version " << version.toString() << " not greater than " << _version.toString() ); } diff --git a/src/mongo/s/d_chunk_manager.h b/src/mongo/s/d_chunk_manager.h index 433332c3c6d..781cfb88ff8 100644 --- a/src/mongo/s/d_chunk_manager.h +++ b/src/mongo/s/d_chunk_manager.h @@ -62,7 +62,7 @@ namespace mongo { /** * Same as the regular constructor but used in unittest (no access to configDB required). * - * @param collectionDoc simulates config.collection's entry for one colleciton + * @param collectionDoc simulates config.collection's entry for one collection * @param chunksDocs simulates config.chunks' entries for one collection's shard */ ShardChunkManager( const BSONObj& collectionDoc , const BSONArray& chunksDoc ); diff --git a/src/mongo/s/d_logic.h b/src/mongo/s/d_logic.h index cda29094597..8b4c29fca56 100644 --- a/src/mongo/s/d_logic.h +++ b/src/mongo/s/d_logic.h @@ -82,7 +82,7 @@ namespace mongo { * the newest one. * * @param ns collection to be accessed - * @param version (IN) the client belive this collection is on and (OUT) the version the manager is actually in + * @param version (IN) the client believe this collection is on and (OUT) the version the manager is actually in * @return true if the access can be allowed at the provided version */ bool trySetVersion( const string& ns , ConfigVersion& version ); @@ -164,7 +164,7 @@ namespace mongo { /** * one per connection from mongos - * holds version state for each namesapce + * holds version state for each namespace */ class ShardedConnectionInfo { public: diff --git a/src/mongo/s/d_migrate.cpp b/src/mongo/s/d_migrate.cpp index d7e68b79d8b..75f9dd99b17 100644 --- a/src/mongo/s/d_migrate.cpp +++ b/src/mongo/s/d_migrate.cpp @@ -572,7 +572,7 @@ namespace mongo { } if ( recordToTouch ) { - // its safe to touch here bceause we have a LockMongoFilesShared + // its safe to touch here because we have a LockMongoFilesShared // we can't do where we get the lock because we would have to unlock the main readlock and tne _trackerLocks // simpler to handle this out there recordToTouch->touch(); diff --git a/src/mongo/s/d_writeback.h b/src/mongo/s/d_writeback.h index fc5d9c19f29..cb3e3278c0a 100644 --- a/src/mongo/s/d_writeback.h +++ b/src/mongo/s/d_writeback.h @@ -40,7 +40,7 @@ namespace mongo { QueueInfo(){} BlockingQueue<BSONObj> queue; - long long lastCall; // this is ellapsed millis since startup + long long lastCall; // this is elapsed millis since startup }; // a map from mongos's serverIDs to queues of "rejected" operations @@ -56,8 +56,8 @@ namespace mongo { * @param remote server ID this operation came from * @param op the operation itself * - * Enqueues opeartion 'op' in server 'remote's queue. The operation will be written back to - * remote at a later stager. + * Enqueues operation 'op' in server 'remote's queue. The operation will be written back to + * remote at a later stage. */ void queueWriteBack( const string& remote , const BSONObj& op ); @@ -87,7 +87,7 @@ namespace mongo { private: - // '_writebackQueueLock' protects only the map itself, since each queue is syncrhonized. + // '_writebackQueueLock' protects only the map itself, since each queue is synchronized. mutable mongo::mutex _writebackQueueLock; WriteBackQueuesMap _writebackQueues; diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h index a3fd0c1cd5b..6d524fc9326 100644 --- a/src/mongo/s/grid.h +++ b/src/mongo/s/grid.h @@ -76,10 +76,10 @@ namespace mongo { /** * - * addShard will create a new shard in the grid. It expects a mongod process to be runing + * addShard will create a new shard in the grid. It expects a mongod process to be running * on the provided address. Adding a shard that is a replica set is supported. * - * @param name is an optional string with the name of the shard. if ommited, grid will + * @param name is an optional string with the name of the shard. if omitted, grid will * generate one and update the parameter. * @param servers is the connection string of the shard being added * @param maxSize is the optional space quota in bytes. Zeros means there's no limitation to diff --git a/src/mongo/s/shard_version.h b/src/mongo/s/shard_version.h index 98cacf67af2..7f723d670b1 100644 --- a/src/mongo/s/shard_version.h +++ b/src/mongo/s/shard_version.h @@ -21,7 +21,7 @@ namespace mongo { /* - * Install chunk shard vesion callbaks in shardconnection code. This activates + * Install chunk shard version callbacks in shardconnection code. This activates * the chunk shard version control that mongos needs. * * MUST be called before accepting any connections. diff --git a/src/mongo/scripting/engine_spidermonkey.cpp b/src/mongo/scripting/engine_spidermonkey.cpp index a69c526b371..d8716cc4cca 100644 --- a/src/mongo/scripting/engine_spidermonkey.cpp +++ b/src/mongo/scripting/engine_spidermonkey.cpp @@ -1806,7 +1806,7 @@ namespace mongo { _convertor->setProperty( _global , "args" , JSVAL_NULL ); } else { - setObject( "args" , *args , true ); // this is for backwards compatability + setObject( "args" , *args , true ); // this is for backwards compatibility } } catch ( const AssertionException& e ) { diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js index 2ff13e7aa16..f7d6963101f 100644 --- a/src/mongo/shell/db.js +++ b/src/mongo/shell/db.js @@ -450,7 +450,7 @@ DB.prototype._getExtraInfo = function(action) { var res = this.getLastErrorCmd(1); if (res) { if (res.err != undefined && res.err != null) { - // error occured, display it + // error occurred, display it print(res.err); return; } diff --git a/src/mongo/shell/linenoise.cpp b/src/mongo/shell/linenoise.cpp index 2b77514bce2..3de42126444 100644 --- a/src/mongo/shell/linenoise.cpp +++ b/src/mongo/shell/linenoise.cpp @@ -65,7 +65,7 @@ * Effect: if n is 1, clear from beginning of line to cursor * Effect: if n is 2, clear entire line * - * CUF (CUrsor Forward) + * CUF (Cursor Forward) * Sequence: ESC [ n C * Effect: moves cursor forward of n chars * diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js index a31d0852b9e..1c7c1e03687 100644 --- a/src/mongo/shell/shardingtest.js +++ b/src/mongo/shell/shardingtest.js @@ -3,7 +3,7 @@ * will be fully operational after the execution of this constructor function. * * @param {Object} testName Contains the key value pair for the cluster - * configuration. Accpeted keys are: + * configuration. Accepted keys are: * * { * name {string}: name for this test diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js index 67fee540097..0aa76a7b76f 100644 --- a/src/mongo/shell/utils_sh.js +++ b/src/mongo/shell/utils_sh.js @@ -52,7 +52,7 @@ sh.help = function() { } sh.status = function( verbose , configDB ) { - // TODO: move the actual commadn here + // TODO: move the actual command here printShardingStatus( configDB , verbose ); } diff --git a/src/mongo/tools/sniffer.cpp b/src/mongo/tools/sniffer.cpp index f83d42268d3..37122fe2ad3 100644 --- a/src/mongo/tools/sniffer.cpp +++ b/src/mongo/tools/sniffer.cpp @@ -18,7 +18,7 @@ /* TODO: - large messages - need to track what's left and ingore + large messages - need to track what's left and ignore single object over packet size - can only display begging of object getmore @@ -91,7 +91,7 @@ struct sniff_ip { u_short ip_id; /* identification */ u_short ip_off; /* fragment offset field */ #define IP_RF 0x8000 /* reserved fragment flag */ -#define IP_DF 0x4000 /* dont fragment flag */ +#define IP_DF 0x4000 /* don't fragment flag */ #define IP_MF 0x2000 /* more fragments flag */ #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ u_char ip_ttl; /* time to live */ diff --git a/src/mongo/util/admin_access.h b/src/mongo/util/admin_access.h index bb882b2b4c5..6c602b1593f 100644 --- a/src/mongo/util/admin_access.h +++ b/src/mongo/util/admin_access.h @@ -23,7 +23,7 @@ namespace mongo { /* * An AdminAccess is an interface class used to determine if certain users have - * priviledges to a given resource. + * privileges to a given resource. * */ class AdminAccess { @@ -35,7 +35,7 @@ namespace mongo { */ virtual bool haveAdminUsers() const = 0; - /** @return priviledged user with this name. This should not block + /** @return privileged user with this name. This should not block * for long and throw if can't get a lock if needed */ virtual BSONObj getAdminUser( const string& username ) const = 0; diff --git a/src/mongo/util/alignedbuilder.cpp b/src/mongo/util/alignedbuilder.cpp index c17ed55922b..89cdc9b7ccc 100644 --- a/src/mongo/util/alignedbuilder.cpp +++ b/src/mongo/util/alignedbuilder.cpp @@ -66,7 +66,7 @@ namespace mongo { size_t sold = s; s += Alignment - 1; s = (s/Alignment)*Alignment; - verify( s >= sold ); // begining + verify( s >= sold ); // beginning verify( (s + sz) <= (sold + sz + Alignment - 1) ); //end _p._data = (char *) s; } @@ -102,7 +102,7 @@ namespace mongo { _p._allocationAddress = p; _p._data = (char *) p; #elif defined(__linux__) - // in theory #ifdef _POSIX_VERSION should work, but it doesn't on OS X 10.4, and needs to be testeed on solaris. + // in theory #ifdef _POSIX_VERSION should work, but it doesn't on OS X 10.4, and needs to be tested on solaris. // so for now, linux only for this. void *p = 0; int res = posix_memalign(&p, Alignment, sz); diff --git a/src/mongo/util/background.h b/src/mongo/util/background.h index 88d5b84ed6a..bc4cc28df6c 100644 --- a/src/mongo/util/background.h +++ b/src/mongo/util/background.h @@ -46,10 +46,10 @@ namespace mongo { class BackgroundJob : boost::noncopyable { protected: /** - * sub-class must intantiate the BackgrounJob + * sub-class must instantiate the BackgroundJob * * @param selfDelete if set to true, object will destruct itself after the run() finished - * @note selfDelete instantes cannot be wait()-ed upon + * @note selfDelete instances cannot be wait()-ed upon */ explicit BackgroundJob(bool selfDelete = false); @@ -78,7 +78,7 @@ namespace mongo { /** * starts job. - * returns immediatelly after dispatching. + * returns immediately after dispatching. * * @note the BackgroundJob object must live for as long the thread is still running, ie * until getState() returns Done. @@ -88,7 +88,7 @@ namespace mongo { /** * wait for completion. * - * @param msTimeOut maximum amount of time to wait in millisecons + * @param msTimeOut maximum amount of time to wait in milliseconds * @return true if did not time out. false otherwise. * * @note you can call wait() more than once if the first call times out. diff --git a/src/mongo/util/concurrency/list.h b/src/mongo/util/concurrency/list.h index c19fcea1f22..14d5965fc19 100644 --- a/src/mongo/util/concurrency/list.h +++ b/src/mongo/util/concurrency/list.h @@ -20,7 +20,7 @@ namespace mongo { - /* DONT USE THIS. it was a dumb idea. + /* DON'T USE THIS. it was a dumb idea. this class uses a mutex for writes, but not for reads. we can get fancier later... diff --git a/src/mongo/util/concurrency/mutexdebugger.h b/src/mongo/util/concurrency/mutexdebugger.h index f3e93a2d703..afa3a522d4f 100644 --- a/src/mongo/util/concurrency/mutexdebugger.h +++ b/src/mongo/util/concurrency/mutexdebugger.h @@ -19,7 +19,7 @@ namespace mongo { /** only used on _DEBUG builds. - MutexDebugger checks that we always acquire locks for multiple mutexes in a consistant (acyclic) order. + MutexDebugger checks that we always acquire locks for multiple mutexes in a consistent (acyclic) order. If we were inconsistent we could deadlock. */ class MutexDebugger { diff --git a/src/mongo/util/file_allocator.h b/src/mongo/util/file_allocator.h index af9be2e0b03..8b62c769f3d 100644 --- a/src/mongo/util/file_allocator.h +++ b/src/mongo/util/file_allocator.h @@ -56,7 +56,7 @@ namespace mongo { static void ensureLength(int fd, long size); - /** @return the singletone */ + /** @return the singleton */ static FileAllocator * get(); private: diff --git a/src/mongo/util/mmap.h b/src/mongo/util/mmap.h index 3db84901e4d..8d7b7cd8927 100644 --- a/src/mongo/util/mmap.h +++ b/src/mongo/util/mmap.h @@ -80,7 +80,7 @@ namespace mongo { }; /** @param fun is called for each MongoFile. - calledl from within a mutex that MongoFile uses. so be careful not to deadlock. + called from within a mutex that MongoFile uses. so be careful not to deadlock. */ template < class F > static void forEach( F fun ); diff --git a/src/mongo/util/net/message.h b/src/mongo/util/net/message.h index e78ff388753..e3fe62bd404 100644 --- a/src/mongo/util/net/message.h +++ b/src/mongo/util/net/message.h @@ -91,7 +91,7 @@ namespace mongo { int messageLength; // total message size, including this int requestID; // identifier for this message int responseTo; // requestID from the original request - // (used in reponses from db) + // (used in responses from db) int opCode; }; #pragma pack() diff --git a/src/mongo/util/net/message_port.h b/src/mongo/util/net/message_port.h index cd89745be9b..0f0c43aa747 100644 --- a/src/mongo/util/net/message_port.h +++ b/src/mongo/util/net/message_port.h @@ -84,7 +84,7 @@ namespace mongo { * say( to ) * recv( from ) * Note: if you fail to call recv and someone else uses this port, - * horrible things will happend + * horrible things will happen */ bool recv( const Message& sent , Message& response ); diff --git a/src/mongo/util/ramlog.h b/src/mongo/util/ramlog.h index 889f4f6a4e2..d8291ec8b7a 100644 --- a/src/mongo/util/ramlog.h +++ b/src/mongo/util/ramlog.h @@ -53,7 +53,7 @@ namespace mongo { }; char lines[N][C]; unsigned h; // current position - unsigned n; // numer of lines stores 0 o N + unsigned n; // number of lines stores 0 o N string _name; typedef map<string,RamLog*> RM; |