summaryrefslogtreecommitdiff
path: root/db/dur_commitjob.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:41 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:41 +0200
commit64b33ee522375a8dc15be2875dfb7db4502259b0 (patch)
tree44979e0aaf6bb576f4a737a93e071e28809b6779 /db/dur_commitjob.cpp
parent4d87ff4aa74d7ae975268ac43eee152dc3f5b7e9 (diff)
downloadmongodb-64b33ee522375a8dc15be2875dfb7db4502259b0.tar.gz
Imported Upstream version 1.8.2
Diffstat (limited to 'db/dur_commitjob.cpp')
-rw-r--r--db/dur_commitjob.cpp13
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");
+ }
+ }
}
}
}