0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

rs skew output bug minor

This commit is contained in:
dwight 2010-08-02 12:27:05 -04:00
parent 609ee9cc8e
commit f0d3292e91
2 changed files with 3 additions and 5 deletions

View File

@ -98,9 +98,9 @@ namespace mongo {
stringstream q;
q << "/_replSetOplog?" << id();
s << td( a(q.str(), "", never ? "?" : hbinfo().opTime.toString()) );
if( hbinfo().skew > INT_MIN )
if( hbinfo().skew > INT_MIN ) {
s << td( grey(str::stream() << hbinfo().skew,!ok) );
else
} else
s << td("");
s << _tr();
}

View File

@ -147,8 +147,8 @@ namespace mongo {
time_t after = mem.lastHeartbeat = time(0); // we set this on any response - we don't get this far if couldn't connect because exception is thrown
try {
long long t = info["time"].numberLong();
mem.skew = 0;
long long t = info["time"].Long();
if( t > after )
mem.skew = (int) (t - after);
else if( t < before )
@ -222,7 +222,6 @@ namespace mongo {
void ReplSetImpl::startHealthTaskFor(Member *m) {
ReplSetHealthPollTask *task = new ReplSetHealthPollTask(m->h(), m->hbinfo());
//DEV log() << "TEMP starting healthtask thread " << m->h().toString() << endl;
healthTasks.insert(task);
task::repeat(task, 2000);
}
@ -239,7 +238,6 @@ namespace mongo {
/*Member* m = _members.head();
while( m ) {
ReplSetHealthPollTask *task = new ReplSetHealthPollTask(m->h(), m->hbinfo());
cout << "TEMP starting hb thread " << m->h().toString() << endl;
healthTasks.insert(task);
task::repeat(shared_ptr<task::Task>(task), 2000);
m = m->next();