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

warning if we hit a bizarre case

This commit is contained in:
Eliot Horowitz 2011-02-16 17:23:16 -05:00
parent a4153eb6ed
commit cf275ec820

View File

@ -209,6 +209,10 @@ namespace mongo {
unsigned long long elapsed = jsTime() - lastPing["ping"].Date(); // in ms
elapsed = elapsed / ( 1000 * 60 ); // convert to minutes
if ( elapsed > ( 60 * 24 * 365 * 100 ) /* 100 years */ ) {
warning() << "distlock elapsed time seems impossible: " << lastPing << endl;
}
if ( elapsed <= _takeoverMinutes ) {
log(1) << "dist_lock lock failed because taken by: " << o << " elapsed minutes: " << elapsed << endl;