From 63943c6541e94a28d9dbe31058c027872b06b37d Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Tue, 12 Apr 2011 13:29:47 -0400 Subject: Keep trying to allocate new file SERVER-2609 --- util/file_allocator.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/file_allocator.cpp b/util/file_allocator.cpp index 85a101c0e1e..269f147cac7 100644 --- a/util/file_allocator.cpp +++ b/util/file_allocator.cpp @@ -278,11 +278,13 @@ namespace mongo { << " took " << ((double)t.millis())/1000.0 << " secs" << endl; - + // no longer in a failed state. allow new writers. + fa->_failed = false; } catch ( ... ) { log() << "error failed to allocate new file: " << name << " size: " << size << ' ' << errnoWithDescription() << endl; + log() << " will try again in 10 seconds" << endl; try { if ( tmp.size() ) BOOST_CHECK_EXCEPTION( boost::filesystem::remove( tmp ) ); @@ -296,9 +298,8 @@ namespace mongo { fa->_pendingUpdated.notify_all(); - // TODO: we should sleep and continue rather than stop - // space might become available - return; // no more allocation + sleepsecs(10); + continue; } { -- cgit v1.2.1