assert_util.h   assert_util.h 
skipping to change at line 40 skipping to change at line 40
enum CommonErrorCodes { enum CommonErrorCodes {
OkCode = 0, OkCode = 0,
DatabaseDifferCaseCode = 13297 , // uassert( 13297 ) DatabaseDifferCaseCode = 13297 , // uassert( 13297 )
SendStaleConfigCode = 13388 , // uassert( 13388 ) SendStaleConfigCode = 13388 , // uassert( 13388 )
RecvStaleConfigCode = 9996, // uassert( 9996 ) RecvStaleConfigCode = 9996, // uassert( 9996 )
PrepareConfigsFailedCode = 13104, // uassert( 13104 ) PrepareConfigsFailedCode = 13104, // uassert( 13104 )
NotMasterOrSecondaryCode = 13436, // uassert( 13436 ) NotMasterOrSecondaryCode = 13436, // uassert( 13436 )
NotMasterNoSlaveOkCode = 13435, // uassert( 13435 ) NotMasterNoSlaveOkCode = 13435, // uassert( 13435 )
NotMaster = 10107, // uassert( 10107 ) NotMaster = 10107, // uassert( 10107 )
IndexOptionsDiffer = 17427 // uassert( 17427 )
}; };
class MONGO_CLIENT_API AssertionCount { class MONGO_CLIENT_API AssertionCount {
public: public:
AssertionCount(); AssertionCount();
void rollover(); void rollover();
void condrollover( int newValue ); void condrollover( int newValue );
int regular; int regular;
int warning; int warning;
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 background.h   background.h 
skipping to change at line 38 skipping to change at line 38
/* background.h /* background.h
Concurrency coordination for administrative operations. Concurrency coordination for administrative operations.
*/ */
#pragma once #pragma once
#include <map> #include <map>
#include <set> #include <set>
#include <string> #include <iosfwd>
#include <sstream>
#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h" #include "mongo/base/string_data.h"
#include "mongo/db/namespace_string.h" #include "mongo/db/namespace_string.h"
#include "mongo/util/concurrency/mutex.h"
namespace mongo { namespace mongo {
/* these are administrative operations / jobs /* these are administrative operations / jobs
for a namespace running in the background, and that only one for a namespace running in the background, and that only one
at a time per namespace is permitted, and that if in progress, at a time per namespace is permitted, and that if in progress,
you aren't allowed to do other NamespaceDetails major manipulations you aren't allowed to do other NamespaceDetails major manipulations
(such as dropping ns or db) even in the foreground and must (such as dropping ns or db) even in the foreground and must
instead uassert. instead uassert.
It's assumed this is not for super-high RPS things, so we don't do It's assumed this is not for super-high RPS things, so we don't do
anything special in the implementation here to be fast. anything special in the implementation here to be fast.
*/ */
class BackgroundOperation : public boost::noncopyable { class BackgroundOperation {
MONGO_DISALLOW_COPYING(BackgroundOperation);
public: public:
static bool inProgForDb(const StringData& db); static bool inProgForDb(const StringData& db);
static bool inProgForNs(const StringData& ns); static bool inProgForNs(const StringData& ns);
static void assertNoBgOpInProgForDb(const StringData& db); static void assertNoBgOpInProgForDb(const StringData& db);
static void assertNoBgOpInProgForNs(const StringData& ns); static void assertNoBgOpInProgForNs(const StringData& ns);
static void dump(std::stringstream&); static void awaitNoBgOpInProgForDb(const StringData& db);
static void awaitNoBgOpInProgForNs(const StringData& ns);
static void dump(std::ostream&);
/* check for in progress before instantiating */ /* check for in progress before instantiating */
BackgroundOperation(const StringData& ns); BackgroundOperation(const StringData& ns);
virtual ~BackgroundOperation(); virtual ~BackgroundOperation();
private: private:
NamespaceString _ns; NamespaceString _ns;
static std::map<std::string, unsigned> dbsInProg;
static std::set<std::string> nsInProg;
static SimpleMutex m;
}; };
} // namespace mongo } // namespace mongo
 End of changes. 6 change blocks. 
8 lines changed or deleted 7 lines changed or added


 batched_command_request.h   batched_command_request.h 
skipping to change at line 143 skipping to change at line 143
void unsetOrdered(); void unsetOrdered();
bool isOrderedSet() const; bool isOrderedSet() const;
bool getOrdered() const; bool getOrdered() const;
void setMetadata(BatchedRequestMetadata* metadata); void setMetadata(BatchedRequestMetadata* metadata);
void unsetMetadata(); void unsetMetadata();
bool isMetadataSet() const; bool isMetadataSet() const;
BatchedRequestMetadata* getMetadata() const; BatchedRequestMetadata* getMetadata() const;
// //
// Helpers for batch pre-processing
//
/**
* Generates a new request, the same as the old, but with insert _i
ds if required.
* Returns NULL if this is not an insert request or all inserts alr
eady have _ids.
*/
static BatchedCommandRequest* cloneWithIds(const BatchedCommandRequ
est& origCmdRequest);
//
// Helpers for auth pre-parsing // Helpers for auth pre-parsing
// //
/** /**
* Helper to determine whether or not there are any upserts in the batch * Helper to determine whether or not there are any upserts in the batch
*/ */
static bool containsUpserts( const BSONObj& writeCmdObj ); static bool containsUpserts( const BSONObj& writeCmdObj );
/** /**
* Helper to extract the namespace being indexed from a raw BSON wr ite command. * Helper to extract the namespace being indexed from a raw BSON wr ite command.
 End of changes. 1 change blocks. 
0 lines changed or deleted 13 lines changed or added


 batched_insert_request.h   batched_insert_request.h 
skipping to change at line 100 skipping to change at line 100
void unsetCollName(); void unsetCollName();
bool isCollNameSet() const; bool isCollNameSet() const;
const std::string& getCollName() const; const std::string& getCollName() const;
void addToDocuments(const BSONObj& documents); void addToDocuments(const BSONObj& documents);
void unsetDocuments(); void unsetDocuments();
bool isDocumentsSet() const; bool isDocumentsSet() const;
std::size_t sizeDocuments() const; std::size_t sizeDocuments() const;
const std::vector<BSONObj>& getDocuments() const; const std::vector<BSONObj>& getDocuments() const;
const BSONObj& getDocumentsAt(std::size_t pos) const; const BSONObj& getDocumentsAt(std::size_t pos) const;
void setDocumentAt(std::size_t pos, const BSONObj& doc);
void setWriteConcern(const BSONObj& writeConcern); void setWriteConcern(const BSONObj& writeConcern);
void unsetWriteConcern(); void unsetWriteConcern();
bool isWriteConcernSet() const; bool isWriteConcernSet() const;
const BSONObj& getWriteConcern() const; const BSONObj& getWriteConcern() const;
void setOrdered(bool ordered); void setOrdered(bool ordered);
void unsetOrdered(); void unsetOrdered();
bool isOrderedSet() const; bool isOrderedSet() const;
bool getOrdered() const; bool getOrdered() const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 btree_index_cursor.h   btree_index_cursor.h 
skipping to change at line 98 skipping to change at line 98
virtual string toString(); virtual string toString();
private: private:
// We keep the constructor private and only allow the AM to create us. // We keep the constructor private and only allow the AM to create us.
friend class BtreeBasedAccessMethod; friend class BtreeBasedAccessMethod;
// For handling bucket deletion. // For handling bucket deletion.
static unordered_set<BtreeIndexCursor*> _activeCursors; static unordered_set<BtreeIndexCursor*> _activeCursors;
static SimpleMutex _activeCursorsMutex; static SimpleMutex _activeCursorsMutex;
// Go forward by default. /**
BtreeIndexCursor(const IndexCatalogEntry* btreeState, BtreeInterfac * btreeState is the ICE of the Btree that we're going to traverse.
e *interface); * head is the head of the Btree.
* interface is an abstraction to hide the fact that we have two ty
pes of Btrees.
*
* Go forward by default.
*
* Intentionally private, we're friends with the only class allowed
to call it.
*/
BtreeIndexCursor(const IndexCatalogEntry* btreeState,
const DiskLoc head,
BtreeInterface *interface);
void skipUnusedKeys(); void skipUnusedKeys();
bool isSavedPositionValid(); bool isSavedPositionValid();
// Move to the next/prev. key. Used by normal getNext and also ski pping unused keys. // Move to the next/prev. key. Used by normal getNext and also ski pping unused keys.
void advance(const char* caller); void advance(const char* caller);
// For saving/restoring position. // For saving/restoring position.
BSONObj _savedKey; BSONObj _savedKey;
 End of changes. 1 change blocks. 
3 lines changed or deleted 14 lines changed or added


 client.h   client.h 
skipping to change at line 112 skipping to change at line 112
/** caution -- use Context class instead */ /** caution -- use Context class instead */
void setContext(Context *c) { _context = c; } void setContext(Context *c) { _context = c; }
/* report what the last operation was. used by getlasterror */ /* report what the last operation was. used by getlasterror */
void appendLastOp( BSONObjBuilder& b ) const; void appendLastOp( BSONObjBuilder& b ) const;
bool isGod() const { return _god; } /* this is for map/reduce write s */ bool isGod() const { return _god; } /* this is for map/reduce write s */
bool setGod(bool newVal) { const bool prev = _god; _god = newVal; r eturn prev; } bool setGod(bool newVal) { const bool prev = _god; _god = newVal; r eturn prev; }
string toString() const; string toString() const;
void gotHandshake( const BSONObj& o ); bool gotHandshake( const BSONObj& o );
BSONObj getRemoteID() const { return _remoteId; } BSONObj getRemoteID() const { return _remoteId; }
BSONObj getHandshake() const { return _handshake; } BSONObj getHandshake() const { return _handshake; }
ConnectionId getConnectionId() const { return _connectionId; } ConnectionId getConnectionId() const { return _connectionId; }
bool inPageFaultRetryableSection() const { return _pageFaultRetryab leSection != 0; } bool inPageFaultRetryableSection() const { return _pageFaultRetryab leSection != 0; }
PageFaultRetryableSection* getPageFaultRetryableSection() const { r eturn _pageFaultRetryableSection; } PageFaultRetryableSection* getPageFaultRetryableSection() const { r eturn _pageFaultRetryableSection; }
void writeHappened() { _hasWrittenSinceCheckpoint = true; _hasWritt enThisOperation = true; } void writeHappened() { _hasWrittenSinceCheckpoint = true; _hasWritt enThisOperation = true; }
bool hasWrittenSinceCheckpoint() const { return _hasWrittenSinceChe ckpoint; } bool hasWrittenSinceCheckpoint() const { return _hasWrittenSinceChe ckpoint; }
void checkpointHappened() { _hasWrittenSinceCheckpoint = false; } void checkpointHappened() { _hasWrittenSinceCheckpoint = false; }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 clientcursor.h   clientcursor.h 
skipping to change at line 152 skipping to change at line 152
* Note: This should *not* be set for the internal cursor used as i nput to an aggregation. * Note: This should *not* be set for the internal cursor used as i nput to an aggregation.
*/ */
bool isAggCursor; bool isAggCursor;
unsigned pinValue() const { return _pinValue; } unsigned pinValue() const { return _pinValue; }
static long long totalOpen(); static long long totalOpen();
private: private:
friend class ClientCursorMonitor; friend class ClientCursorMonitor;
friend class ClientCursorPin;
friend class CmdCursorInfo; friend class CmdCursorInfo;
friend class CollectionCursorCache;
/** /**
* Initialization common between both constructors for the ClientCu rsor. * Initialization common between both constructors for the ClientCu rsor.
*/ */
void init(); void init();
// //
// ClientCursor-specific data, independent of the underlying execut ion type. // ClientCursor-specific data, independent of the underlying execut ion type.
// //
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added


 collection_cursor_cache.h   collection_cursor_cache.h 
skipping to change at line 36 skipping to change at line 36
* delete this exception statement from your version. If you delete this * delete this exception statement from your version. If you delete this
* exception statement from all source files in the program, then also de lete * exception statement from all source files in the program, then also de lete
* it in the license file. * it in the license file.
*/ */
#pragma once #pragma once
#include "mongo/db/clientcursor.h" #include "mongo/db/clientcursor.h"
#include "mongo/db/diskloc.h" #include "mongo/db/diskloc.h"
#include "mongo/db/invalidation_type.h" #include "mongo/db/invalidation_type.h"
#include "mongo/db/namespace_string.h"
#include "mongo/platform/unordered_set.h" #include "mongo/platform/unordered_set.h"
#include "mongo/util/concurrency/mutex.h" #include "mongo/util/concurrency/mutex.h"
namespace mongo { namespace mongo {
class PseudoRandom; class PseudoRandom;
class Runner; class Runner;
class CollectionCursorCache { class CollectionCursorCache {
public: public:
skipping to change at line 95 skipping to change at line 96
/** /**
* Remove a runner from the runner registry. * Remove a runner from the runner registry.
*/ */
void deregisterRunner(Runner* runner); void deregisterRunner(Runner* runner);
// ----------------- // -----------------
CursorId registerCursor( ClientCursor* cc ); CursorId registerCursor( ClientCursor* cc );
void deregisterCursor( ClientCursor* cc ); void deregisterCursor( ClientCursor* cc );
bool eraseCursor( CursorId id, bool checkAuth );
void getCursorIds( std::set<CursorId>* openCursors ); void getCursorIds( std::set<CursorId>* openCursors );
std::size_t numCursors(); std::size_t numCursors();
ClientCursor* find( CursorId id ); /**
* @param pin - if true, will try to pin cursor
* if pinned already, will assert
* otherwise will pin
*/
ClientCursor* find( CursorId id, bool pin );
void unpin( ClientCursor* cursor );
// ---------------------- // ----------------------
static int eraseCursorGlobalIfAuthorized( int n, long long* ids ); static int eraseCursorGlobalIfAuthorized( int n, long long* ids );
static bool eraseCursorGlobalIfAuthorized( CursorId id ); static bool eraseCursorGlobalIfAuthorized( CursorId id );
static bool eraseCursorGlobal( CursorId id ); static bool eraseCursorGlobal( CursorId id );
/** /**
* @return number timed out * @return number timed out
*/ */
static std::size_t timeoutCursorsGlobal( unsigned millisSinceLastCa ll ); static std::size_t timeoutCursorsGlobal( unsigned millisSinceLastCa ll );
private: private:
CursorId _allocateCursorId_inlock(); CursorId _allocateCursorId_inlock();
void _deregisterCursor_inlock( ClientCursor* cc ); void _deregisterCursor_inlock( ClientCursor* cc );
string _ns; NamespaceString _nss;
unsigned _collectionCacheRuntimeId; unsigned _collectionCacheRuntimeId;
scoped_ptr<PseudoRandom> _random; scoped_ptr<PseudoRandom> _random;
SimpleMutex _mutex; SimpleMutex _mutex;
typedef unordered_set<Runner*> RunnerSet; typedef unordered_set<Runner*> RunnerSet;
RunnerSet _nonCachedRunners; RunnerSet _nonCachedRunners;
typedef std::map<CursorId,ClientCursor*> CursorMap; typedef std::map<CursorId,ClientCursor*> CursorMap;
CursorMap _cursors; CursorMap _cursors;
 End of changes. 4 change blocks. 
2 lines changed or deleted 12 lines changed or added


 error_codes.h   error_codes.h 
skipping to change at line 120 skipping to change at line 120
NodeNotFound = 74, NodeNotFound = 74,
WriteConcernLegacyOK = 75, WriteConcernLegacyOK = 75,
NoReplicationEnabled = 76, NoReplicationEnabled = 76,
OperationIncomplete = 77, OperationIncomplete = 77,
CommandResultSchemaViolation = 78, CommandResultSchemaViolation = 78,
UnknownReplWriteConcern = 79, UnknownReplWriteConcern = 79,
RoleDataInconsistent = 80, RoleDataInconsistent = 80,
NoClientContext = 81, NoClientContext = 81,
NoProgressMade = 82, NoProgressMade = 82,
RemoteResultsUnavailable = 83, RemoteResultsUnavailable = 83,
IndexOptionsConflict = 85,
IndexKeySpecsConflict = 86,
NotMaster = 10107, NotMaster = 10107,
DuplicateKey = 11000, DuplicateKey = 11000,
InterruptedAtShutdown = 11600, InterruptedAtShutdown = 11600,
Interrupted = 11601, Interrupted = 11601,
BackgroundOperationInProgressForDatabase = 12586,
BackgroundOperationInProgressForNamespace = 12587,
OutOfDiskSpace = 14031, OutOfDiskSpace = 14031,
MaxError MaxError
}; };
static std::string errorString(Error err); static std::string errorString(Error err);
/** /**
* Parses an Error from its "name". Returns UnknownError if "name" is unrecognized. * Parses an Error from its "name". Returns UnknownError if "name" is unrecognized.
* *
* NOTE: Also returns UnknownError for the string "UnknownError". * NOTE: Also returns UnknownError for the string "UnknownError".
skipping to change at line 146 skipping to change at line 150
/** /**
* Casts an integer "code" to an Error. Unrecognized codes are pre served, meaning * Casts an integer "code" to an Error. Unrecognized codes are pre served, meaning
* that the result of a call to fromInt() may not be one of the val ues in the * that the result of a call to fromInt() may not be one of the val ues in the
* Error enumeration. * Error enumeration.
*/ */
static Error fromInt(int code); static Error fromInt(int code);
static bool isNetworkError(Error err); static bool isNetworkError(Error err);
static bool isInterruption(Error err); static bool isInterruption(Error err);
static bool isIndexCreationError(Error err);
}; };
} // namespace mongo } // namespace mongo
 End of changes. 3 change blocks. 
0 lines changed or deleted 5 lines changed or added


 index_scan.h   index_scan.h 
skipping to change at line 98 skipping to change at line 98
virtual StageState work(WorkingSetID* out); virtual StageState work(WorkingSetID* out);
virtual bool isEOF(); virtual bool isEOF();
virtual void prepareToYield(); virtual void prepareToYield();
virtual void recoverFromYield(); virtual void recoverFromYield();
virtual void invalidate(const DiskLoc& dl, InvalidationType type); virtual void invalidate(const DiskLoc& dl, InvalidationType type);
virtual PlanStageStats* getStats(); virtual PlanStageStats* getStats();
private: private:
/** /**
* Initialize the underlying IndexCursor * Initialize the underlying IndexCursor, grab information from the catalog for stats.
*/ */
void initIndexCursor(); void initIndexScan();
/** See if the cursor is pointing at or past _endKey, if _endKey is non-empty. */ /** See if the cursor is pointing at or past _endKey, if _endKey is non-empty. */
void checkEnd(); void checkEnd();
// The WorkingSet we annotate with results. Not owned by us. // The WorkingSet we annotate with results. Not owned by us.
WorkingSet* _workingSet; WorkingSet* _workingSet;
// Index access. // Index access.
const IndexAccessMethod* _iam; // owned by Collection -> IndexCatal og const IndexAccessMethod* _iam; // owned by Collection -> IndexCatal og
scoped_ptr<IndexCursor> _indexCursor; scoped_ptr<IndexCursor> _indexCursor;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 message.h   message.h 
skipping to change at line 32 skipping to change at line 32
#include "mongo/bson/util/atomic_int.h" #include "mongo/bson/util/atomic_int.h"
#include "mongo/util/goodies.h" #include "mongo/util/goodies.h"
#include "mongo/util/net/hostandport.h" #include "mongo/util/net/hostandport.h"
#include "mongo/util/net/sock.h" #include "mongo/util/net/sock.h"
namespace mongo { namespace mongo {
/** /**
* Maximum accepted message size on the wire protocol. * Maximum accepted message size on the wire protocol.
*/ */
const int MaxMessageSizeBytes = 48 * 1000 * 1000; const size_t MaxMessageSizeBytes = 48 * 1000 * 1000;
class Message; class Message;
class MessagingPort; class MessagingPort;
class PiggyBackData; class PiggyBackData;
typedef AtomicUInt MSGID; typedef AtomicUInt MSGID;
enum Operations { enum Operations {
opReply = 1, /* reply. responseTo is set. */ opReply = 1, /* reply. responseTo is set. */
dbMsg = 1000, /* generic msg command followed by a string */ dbMsg = 1000, /* generic msg command followed by a string */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 mock_ns_targeter.h   mock_ns_targeter.h 
skipping to change at line 163 skipping to change at line 163
} }
const std::vector<MockRange*>& getRanges() const { const std::vector<MockRange*>& getRanges() const {
return _mockRanges.vector(); return _mockRanges.vector();
} }
private: private:
KeyRange parseRange( const BSONObj& query ) const { KeyRange parseRange( const BSONObj& query ) const {
ASSERT_EQUALS( query.nFields(), 1 );
string fieldName = query.firstElement().fieldName(); string fieldName = query.firstElement().fieldName();
if ( query.firstElement().isNumber() ) { if ( query.firstElement().isNumber() ) {
return KeyRange( "", return KeyRange( "",
BSON( fieldName << query.firstElement().nu mberInt() ), BSON( fieldName << query.firstElement().nu mberInt() ),
BSON( fieldName << query.firstElement().nu mberInt() + 1 ), BSON( fieldName << query.firstElement().nu mberInt() + 1 ),
BSON( fieldName << 1 ) ); BSON( fieldName << 1 ) );
} }
else if ( query.firstElement().type() == Object ) { else if ( query.firstElement().type() == Object ) {
 End of changes. 1 change blocks. 
1 lines changed or deleted 0 lines changed or added


 query_solution.h   query_solution.h 
skipping to change at line 529 skipping to change at line 529
_sorts.insert(pattern); _sorts.insert(pattern);
} }
BSONObjSet _sorts; BSONObjSet _sorts;
BSONObj pattern; BSONObj pattern;
BSONObj query; BSONObj query;
// Sum of both limit and skip count in the parsed query. // Sum of both limit and skip count in the parsed query.
int limit; size_t limit;
}; };
struct LimitNode : public QuerySolutionNode { struct LimitNode : public QuerySolutionNode {
LimitNode() { } LimitNode() { }
virtual ~LimitNode() { } virtual ~LimitNode() { }
virtual StageType getType() const { return STAGE_LIMIT; } virtual StageType getType() const { return STAGE_LIMIT; }
virtual void appendToString(mongoutils::str::stream* ss, int indent ) const; virtual void appendToString(mongoutils::str::stream* ss, int indent ) const;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 rs.h   rs.h 
skipping to change at line 548 skipping to change at line 548
GhostSync *ghost; GhostSync *ghost;
/** /**
* This forces a secondary to go into recovering state and stay the re * This forces a secondary to go into recovering state and stay the re
* until this is called again, passing in "false". Multiple thread s can * until this is called again, passing in "false". Multiple thread s can
* call this and it will leave maintenance mode once all of the cal lers * call this and it will leave maintenance mode once all of the cal lers
* have called it again, passing in false. * have called it again, passing in false.
*/ */
bool setMaintenanceMode(const bool inc); bool setMaintenanceMode(const bool inc);
// Records a new slave's id in the GhostSlave map, at handshake tim e. // Records a new slave's id in the GhostSlave map, at handshake tim e.
void registerSlave(const BSONObj& rid, const int memberId); bool registerSlave(const BSONObj& rid, const int memberId);
private: private:
Member* head() const { return _members.head(); } Member* head() const { return _members.head(); }
public: public:
const Member* findById(unsigned id) const; const Member* findById(unsigned id) const;
Member* getMutableMember(unsigned id); Member* getMutableMember(unsigned id);
Member* findByName(const std::string& hostname) const; Member* findByName(const std::string& hostname) const;
/** /**
* Cause the node to resync from scratch. * Cause the node to resync from scratch.
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 runner.h   runner.h 
skipping to change at line 184 skipping to change at line 184
* Called from CollectionCursorCache::invalidateDocument. * Called from CollectionCursorCache::invalidateDocument.
* *
* See db/invalidation_type.h for InvalidationType. * See db/invalidation_type.h for InvalidationType.
*/ */
virtual void invalidate(const DiskLoc& dl, InvalidationType type) = 0; virtual void invalidate(const DiskLoc& dl, InvalidationType type) = 0;
/** /**
* Mark the Runner as no longer valid. Can happen when a runner yi elds and the underlying * Mark the Runner as no longer valid. Can happen when a runner yi elds and the underlying
* database is dropped/indexes removed/etc. All future to calls to getNext return * database is dropped/indexes removed/etc. All future to calls to getNext return
* RUNNER_DEAD. Every other call is a NOOP. * RUNNER_DEAD. Every other call is a NOOP.
*
* The runner must guarantee as a postcondition that future calls t
o collection() will
* return NULL.
*/ */
virtual void kill() = 0; virtual void kill() = 0;
/** /**
* Save any state required to yield. * Save any state required to yield.
*/ */
virtual void saveState() = 0; virtual void saveState() = 0;
/** /**
* Restore saved state, possibly after a yield. Return true if the runner is OK, false if * Restore saved state, possibly after a yield. Return true if the runner is OK, false if
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 sort.h   sort.h 
skipping to change at line 58 skipping to change at line 58
class SortStageParams { class SortStageParams {
public: public:
SortStageParams() : limit(0) { } SortStageParams() : limit(0) { }
// How we're sorting. // How we're sorting.
BSONObj pattern; BSONObj pattern;
// The query. Used to create the IndexBounds for the sorting. // The query. Used to create the IndexBounds for the sorting.
BSONObj query; BSONObj query;
// Must be >= 0. Equal to 0 for no limit. // Equal to 0 for no limit.
int limit; size_t limit;
}; };
/** /**
* Maps a WSM value to a BSONObj key that can then be sorted via BSONOb jCmp. * Maps a WSM value to a BSONObj key that can then be sorted via BSONOb jCmp.
*/ */
class SortStageKeyGenerator { class SortStageKeyGenerator {
public: public:
/** /**
* 'sortSpec' is the BSONObj in the .sort(...) clause. * 'sortSpec' is the BSONObj in the .sort(...) clause.
* *
skipping to change at line 167 skipping to change at line 167
// Where we're reading data to sort from. // Where we're reading data to sort from.
boost::scoped_ptr<PlanStage> _child; boost::scoped_ptr<PlanStage> _child;
// The raw sort _pattern as expressed by the user // The raw sort _pattern as expressed by the user
BSONObj _pattern; BSONObj _pattern;
// The raw query as expressed by the user // The raw query as expressed by the user
BSONObj _query; BSONObj _query;
// Must be >= 0. Equal to 0 for no limit. // Equal to 0 for no limit.
int _limit; size_t _limit;
// //
// Sort key generation // Sort key generation
// //
boost::scoped_ptr<SortStageKeyGenerator> _sortKeyGen; boost::scoped_ptr<SortStageKeyGenerator> _sortKeyGen;
// //
// Data storage // Data storage
// //
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added


 sync_source_feedback.h   sync_source_feedback.h 
skipping to change at line 51 skipping to change at line 51
_syncTarget(NULL), _syncTarget(NULL),
_oplogReader(new OplogReader()), _oplogReader(new OplogReader()),
_supportsUpdater(true), _supportsUpdater(true),
_positionChanged(false), _positionChanged(false),
_handshakeNeeded(false) {} _handshakeNeeded(false) {}
~SyncSourceFeedback() { ~SyncSourceFeedback() {
delete _oplogReader; delete _oplogReader;
} }
/// Adds an entry to _member for a secondary that has connected to /// Adds an entry to _members for a secondary that has connected to
us. us.
void associateMember(const BSONObj& id, const int memberId); void associateMember(const BSONObj& id, Member* member);
/// Ensures local.me is populated and populates it if not. /// Ensures local.me is populated and populates it if not.
void ensureMe(); void ensureMe();
/// Passes handshake up the replication chain, upon receiving a han dshake. /// Passes handshake up the replication chain, upon receiving a han dshake.
void forwardSlaveHandshake(); void forwardSlaveHandshake();
void updateSelfInMap(const OpTime& ot) { void updateSelfInMap(const OpTime& ot) {
updateMap(_me["_id"].OID(), ot); updateMap(_me["_id"].OID(), ot);
} }
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added


 write_op.h   write_op.h 
skipping to change at line 103 skipping to change at line 103
class WriteOp { class WriteOp {
public: public:
WriteOp( const BatchItemRef& itemRef ) : WriteOp( const BatchItemRef& itemRef ) :
_itemRef( itemRef ), _state( WriteOpState_Ready ) { _itemRef( itemRef ), _state( WriteOpState_Ready ) {
} }
~WriteOp(); ~WriteOp();
/** /**
* Returns the write item for this operation
*/
const BatchItemRef& getWriteItem() const;
/**
* Returns the op's current state. * Returns the op's current state.
*/ */
WriteOpState getWriteState() const; WriteOpState getWriteState() const;
/** /**
* Returns the op's error. * Returns the op's error.
* *
* Can only be used in state _Error * Can only be used in state _Error
*/ */
const WriteErrorDetail& getOpError() const; const WriteErrorDetail& getOpError() const;
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/