summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2010-03-15 13:57:13 -0400
committerEliot Horowitz <eliot@10gen.com>2010-03-31 17:03:51 -0400
commit2fd67aca84165be834319139d07634f888b18bb5 (patch)
tree3281a7ae379f640cedae17de78378c419bc05afa
parentfca1962ce402aac501512b780c81c52d2c0778da (diff)
downloadmongo-2fd67aca84165be834319139d07634f888b18bb5.tar.gz
Async flush uasserts on windows SERVER-735
-rw-r--r--util/mmap_win.cpp15
1 files 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;
}
}
}