allocate files in background
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "reccache.h"
|
||||
#include "replset.h"
|
||||
#include "../s/d_logic.h"
|
||||
#include "../util/file_allocator.h"
|
||||
#if !defined(_WIN32)
|
||||
#include <sys/file.h>
|
||||
#endif
|
||||
@@ -652,6 +653,11 @@ namespace mongo {
|
||||
/* must do this before unmapping mem or you may get a seg fault */
|
||||
closeAllSockets();
|
||||
|
||||
// wait until file preallocation finishes
|
||||
// we would only hang here if the file_allocator code generates a
|
||||
// synchronous signal, which we don't expect
|
||||
theFileAllocator().waitUntilFinished();
|
||||
|
||||
stringstream ss3;
|
||||
MemoryMappedFile::closeAllFiles( ss3 );
|
||||
rawOut( ss3.str() );
|
||||
|
||||
Reference in New Issue
Block a user