dbclient.h   dbclient.h 
skipping to change at line 910 skipping to change at line 910
/* this is the callback from our underlying connections to notify u s that we got a "not master" error. /* this is the callback from our underlying connections to notify u s that we got a "not master" error.
*/ */
void isntMaster() { void isntMaster() {
master = ( ( master == Left ) ? NotSetR : NotSetL ); master = ( ( master == Left ) ? NotSetR : NotSetL );
} }
string getServerAddress() const { string getServerAddress() const {
return left.getServerAddress() + "," + right.getServerAddress() ; return left.getServerAddress() + "," + right.getServerAddress() ;
} }
DBClientConnection& masterConn();
DBClientConnection& slaveConn(); DBClientConnection& slaveConn();
/* TODO - not yet implemented. mongos may need these. */ /* TODO - not yet implemented. mongos may need these. */
virtual bool call( Message &toSend, Message &response, bool assertO k=true ) { assert(false); return false; } virtual bool call( Message &toSend, Message &response, bool assertO k=true ) { assert(false); return false; }
virtual void say( Message &toSend ) { assert(false); } virtual void say( Message &toSend ) { assert(false); }
virtual void sayPiggyBack( Message &toSend ) { assert(false); } virtual void sayPiggyBack( Message &toSend ) { assert(false); }
virtual void checkResponse( const char *data, int nReturned ) { ass ert(false); } virtual void checkResponse( const char *data, int nReturned ) { ass ert(false); }
bool isFailed() const { bool isFailed() const {
// TODO: this really should check isFailed on current master as well // TODO: this really should check isFailed on current master as well
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 dbmessage.h   dbmessage.h 
skipping to change at line 145 skipping to change at line 145
if ( nextjsobj == data ) { if ( nextjsobj == data ) {
nextjsobj += strlen(data) + 1; // skip namespace nextjsobj += strlen(data) + 1; // skip namespace
massert( 13066 , "Message contains no documents", theEnd > nextjsobj ); massert( 13066 , "Message contains no documents", theEnd > nextjsobj );
} }
massert( 10304 , "Remaining data too small for BSON object", t heEnd - nextjsobj > 3 ); massert( 10304 , "Remaining data too small for BSON object", t heEnd - nextjsobj > 3 );
BSONObj js(nextjsobj); BSONObj js(nextjsobj);
massert( 10305 , "Invalid object size", js.objsize() > 3 ); massert( 10305 , "Invalid object size", js.objsize() > 3 );
massert( 10306 , "Next object larger than available space", massert( 10306 , "Next object larger than available space",
js.objsize() < ( theEnd - data ) ); js.objsize() < ( theEnd - data ) );
if ( objcheck && !js.valid() ) { if ( objcheck && !js.valid() ) {
if ( logLevel >= 3 ) {
log() << "bad object: " << js.hexDump() << endl;
}
massert( 10307 , "bad object in message", false); massert( 10307 , "bad object in message", false);
} }
nextjsobj += js.objsize(); nextjsobj += js.objsize();
if ( nextjsobj >= theEnd ) if ( nextjsobj >= theEnd )
nextjsobj = 0; nextjsobj = 0;
return js; return js;
} }
const Message& msg() { const Message& msg() {
return m; return m;
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added


 repl.h   repl.h 
skipping to change at line 68 skipping to change at line 68
bool master; bool master;
int opIdMem; int opIdMem;
bool fastsync; bool fastsync;
bool autoresync; bool autoresync;
int slavedelay; int slavedelay;
bool pretouch;
ReplSettings() ReplSettings()
: slave(NotSlave) , master(false) , opIdMem(100000000) , fastsy nc() , autoresync(false), slavedelay() { : slave(NotSlave) , master(false) , opIdMem(100000000) , fastsy nc() , autoresync(false), slavedelay(), pretouch(false) {
} }
}; };
extern ReplSettings replSettings; extern ReplSettings replSettings;
bool cloneFrom(const char *masterHost, string& errmsg, const string& fr omdb, bool logForReplication, bool cloneFrom(const char *masterHost, string& errmsg, const string& fr omdb, bool logForReplication,
bool slaveOk, bool useReplAuth, bool snap shot); bool slaveOk, bool useReplAuth, bool snap shot);
/* A replication exception */ /* A replication exception */
skipping to change at line 133 skipping to change at line 135
static BSONObj idForOp( const BSONObj &op, bool &mod ); static BSONObj idForOp( const BSONObj &op, bool &mod );
static void updateSetsWithOp( const BSONObj &op, bool mayUpdateStor age ); static void updateSetsWithOp( const BSONObj &op, bool mayUpdateStor age );
// call without the db mutex // call without the db mutex
void syncToTailOfRemoteLog(); void syncToTailOfRemoteLog();
// call with the db mutex // call with the db mutex
OpTime nextLastSavedLocalTs() const; OpTime nextLastSavedLocalTs() const;
void setLastSavedLocalTs( const OpTime &nextLocalTs ); void setLastSavedLocalTs( const OpTime &nextLocalTs );
// call without the db mutex // call without the db mutex
void resetSlave(); void resetSlave();
// call with the db mutex // call with the db mutex
// returns false if the slave has been reset int updateSetsWithLocalOps( OpTime &localLogTail, bool mayUnlock );
bool updateSetsWithLocalOps( OpTime &localLogTail, bool mayUnlock )
;
string ns() const { return string( "local.oplog.$" ) + sourceName() ; } string ns() const { return string( "local.oplog.$" ) + sourceName() ; }
unsigned _sleepAdviceTime; unsigned _sleepAdviceTime;
public: public:
static void applyOperation(const BSONObj& op); static void applyOperation(const BSONObj& op);
bool replacing; // in "replace mode" -- see CmdReplacePeer bool replacing; // in "replace mode" -- see CmdReplacePeer
bool paired; // --pair in use bool paired; // --pair in use
string hostName; // ip addr or hostname plus optionally, ":<port >" string hostName; // ip addr or hostname plus optionally, ":<port >"
string _sourceName; // a logical source name. string _sourceName; // a logical source name.
string sourceName() const { string sourceName() const {
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 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/