diff --git a/src/mongo/db/dur.cpp b/src/mongo/db/dur.cpp index e060155bae065..ce598955c3498 100644 --- a/src/mongo/db/dur.cpp +++ b/src/mongo/db/dur.cpp @@ -796,14 +796,13 @@ namespace mongo { try { stats.rotate(); - // we do this in a couple blocks (the invoke()), which makes it a tiny bit faster (only a little) on throughput, - // but is likely also less spiky on our cpu usage, which is good. - // commit sooner if one or more getLastError j:true is pending sleepmillis(oneThird); for( unsigned i = 1; i <= 2; i++ ) { if( commitJob._notify.nWaiting() ) break; + if( commitJob.bytes() > UncommittedBytesLimit / 2 ) + break; sleepmillis(oneThird); }