From 2fd67aca84165be834319139d07634f888b18bb5 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Mon, 15 Mar 2010 13:57:13 -0400 Subject: Async flush uasserts on windows SERVER-735 --- util/mmap_win.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/util/mmap_win.cpp b/util/mmap_win.cpp index bbb7d873986..6f7fd803310 100644 --- a/util/mmap_win.cpp +++ b/util/mmap_win.cpp @@ -100,21 +100,20 @@ namespace mongo { } void MemoryMappedFile::flush(bool sync) { + uassert(13056, "Async flushing not supported on windows", sync); + if (!view) return; - // Note: this is blocking and ignores sync bool success = FlushViewOfFile(view, 0); // 0 means whole mapping if (!success){ int err = GetLastError(); - out() << "FlushViewOfFile failed " << err << " " << endl; + out() << "FlushViewOfFile failed " << err << endl; } - if (sync){ - bool success = FlushFileBuffers(fd); - if (!success){ - int err = GetLastError(); - out() << "FlushFileBuffers failed " << err << " " << endl; - } + success = FlushFileBuffers(fd); + if (!success){ + int err = GetLastError(); + out() << "FlushFileBuffers failed " << err << endl; } } } -- cgit v1.2.1