mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
minor
This commit is contained in:
parent
3664f5a5c9
commit
a9cb4e6918
@ -41,6 +41,7 @@ namespace mongo {
|
||||
}
|
||||
} cmdReplSetHeartbeat;
|
||||
|
||||
/* poll every other set member to check its status */
|
||||
class FeedbackThread : public BackgroundJob {
|
||||
public:
|
||||
ReplSet::MemberInfo *m;
|
||||
@ -51,6 +52,9 @@ namespace mongo {
|
||||
BSONObj info;
|
||||
bool ok = conn.simpleCommand("admin", &info, "replSetHeartbeat");
|
||||
log() << "TEMP heartbeat " << ok << ' ' << info.toString() << endl;
|
||||
if( ok ) {
|
||||
m->lastHeartbeat = time(0);
|
||||
}
|
||||
}
|
||||
catch(...) {
|
||||
log() << "TEMP heartbeat not ok" << endl;
|
||||
|
@ -59,8 +59,9 @@ namespace mongo {
|
||||
const char *host;
|
||||
int port;
|
||||
|
||||
int lastHeartbeat;
|
||||
time_t lastHeartbeat;
|
||||
};
|
||||
/* all members of the set EXCEPT SELF. */
|
||||
List1<MemberInfo> _members;
|
||||
|
||||
void startHealthThreads();
|
||||
|
Loading…
Reference in New Issue
Block a user