From 64b33ee522375a8dc15be2875dfb7db4502259b0 Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Sat, 18 Jun 2011 21:24:41 +0200 Subject: Imported Upstream version 1.8.2 --- db/dur_commitjob.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'db/dur_commitjob.cpp') 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"); + } + } } } } -- cgit v1.2.3