diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-06-18 21:24:54 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-06-18 21:24:54 +0200 |
commit | fefb1e355f6cbe35160f2f73ed68a38d95fa59a2 (patch) | |
tree | faecb2fb6677516c5f6d9edfae8475344ddd73ed /db/dur_commitjob.cpp | |
parent | d95b46b2bbb5b4246213f252010508489b4e5719 (diff) | |
parent | 64b33ee522375a8dc15be2875dfb7db4502259b0 (diff) | |
download | mongodb-fefb1e355f6cbe35160f2f73ed68a38d95fa59a2.tar.gz |
Merge commit 'upstream/1.8.2'
Diffstat (limited to 'db/dur_commitjob.cpp')
-rw-r--r-- | db/dur_commitjob.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/db/dur_commitjob.cpp b/db/dur_commitjob.cpp index 2d57ffd..c67f37c 100644 --- a/db/dur_commitjob.cpp +++ b/db/dur_commitjob.cpp @@ -200,8 +200,17 @@ namespace mongo { log() << "debug nsincecommitifneeded:" << _nSinceCommitIfNeededCall << " bytes:" << _bytes << endl; } #endif - if ( _bytes >= UncommittedBytesLimit * 3 ) { - wassert( ! "DR102 too much data written uncommitted" ); + if (_bytes > UncommittedBytesLimit * 3) { + static time_t lastComplain; + static unsigned nComplains; + // throttle logging + if( ++nComplains < 100 || time(0) - lastComplain >= 60 ) { + lastComplain = time(0); + log() << "replSet warning DR102 too much data written uncommitted " << _bytes/1000000.0 << "MB" << endl; + if( nComplains < 10 || nComplains % 10 == 0 ) { + wassert(!"replSet warning DR102 too much data written uncommitted"); + } + } } } } |