mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
rs checkpoint work
This commit is contained in:
parent
f7932bcc15
commit
f0234a1fbb
@ -45,7 +45,8 @@ namespace mongo {
|
||||
_shutdown(false),
|
||||
_desc(desc),
|
||||
_god(0),
|
||||
_lastOp(0), _mp(p)
|
||||
_lastOp(0),
|
||||
_mp(p)
|
||||
{
|
||||
_curOp = new CurOp( this );
|
||||
scoped_lock bl(clientsMutex);
|
||||
@ -56,7 +57,7 @@ namespace mongo {
|
||||
_god = 0;
|
||||
|
||||
if ( _context )
|
||||
error() << "Client::~Client _context should be NULL: " << _desc << endl;
|
||||
error() << "Client::~Client _context should be null but is not; client:" << _desc << endl;
|
||||
|
||||
if ( ! _shutdown ) {
|
||||
error() << "Client::shutdown not called: " << _desc << endl;
|
||||
@ -82,7 +83,7 @@ namespace mongo {
|
||||
dropCollection( ns , err , b );
|
||||
}
|
||||
catch ( ... ){
|
||||
warning() << "couldn't dropping temp collection: " << ns << endl;
|
||||
warning() << "error dropping temp collection: " << ns << endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ namespace mongo {
|
||||
|
||||
static mongo::mutex clientsMutex;
|
||||
static set<Client*> clients; // always be in clientsMutex when manipulating this
|
||||
|
||||
static int recommendedYieldMicros( int * writers = 0 , int * readers = 0 );
|
||||
|
||||
/* set _god=true temporarily, safely */
|
||||
@ -155,7 +154,7 @@ namespace mongo {
|
||||
}
|
||||
|
||||
friend class CurOp;
|
||||
};
|
||||
}; // class Client::Context
|
||||
|
||||
private:
|
||||
void _dropns( const string& ns );
|
||||
@ -172,7 +171,7 @@ namespace mongo {
|
||||
BSONObj _remoteId;
|
||||
|
||||
public:
|
||||
MessagingPort const *_mp;
|
||||
MessagingPort * const _mp;
|
||||
|
||||
string clientAddress() const;
|
||||
AuthenticationInfo * getAuthenticationInfo(){ return &_ai; }
|
||||
|
@ -62,6 +62,14 @@ namespace mongo {
|
||||
errmsg = "not running with --replSet";
|
||||
return false;
|
||||
}
|
||||
|
||||
/* we want to keep heartbeat connections open when relinquishing primary. tag them here. */
|
||||
{
|
||||
MessagingPort *mp = cc()._mp;
|
||||
if( mp )
|
||||
mp->tag |= 1;
|
||||
}
|
||||
|
||||
if( cmdObj["pv"].Int() != 1 ) {
|
||||
errmsg = "incompatible replset protocol version";
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user