diff options
author | Adam Midvidy <amidvidy@gmail.com> | 2016-02-19 10:51:37 -0500 |
---|---|---|
committer | Adam Midvidy <amidvidy@gmail.com> | 2016-02-23 12:45:05 -0500 |
commit | fd19c6fb06f56662bf517b0330a238d6c29efa7c (patch) | |
tree | 505ee7d42b93bc3541b522b3c537d591fa399374 /src/mongo/dbtests | |
parent | c4369291d37de2f07968f305dd0fe107bcab8a37 (diff) | |
download | mongo-fd19c6fb06f56662bf517b0330a238d6c29efa7c.tar.gz |
SERVER-22357 do not flush READONLY files
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/mmaptests.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/dbtests/mmaptests.cpp b/src/mongo/dbtests/mmaptests.cpp index 837d4c96ba6..603f968355e 100644 --- a/src/mongo/dbtests/mmaptests.cpp +++ b/src/mongo/dbtests/mmaptests.cpp @@ -79,7 +79,7 @@ public: { DurableMappedFile f; unsigned long long len = 256 * 1024 * 1024; - verify(f.create(fn, len, /*sequential*/ false)); + verify(f.create(fn, len)); { char* p = (char*)f.getView(); verify(p); @@ -110,8 +110,10 @@ public: // we make a lot here -- if we were leaking, presumably it would fail doing this many. Timer t; for (int i = 0; i < N; i++) { - DurableMappedFile f; - verify(f.open(fn, i % 4 == 1)); + // Every 4 iterations we pass the sequential hint. + DurableMappedFile f{i % 4 == 1 ? MongoFile::Options::SEQUENTIAL + : MongoFile::Options::NONE}; + verify(f.open(fn)); { char* p = (char*)f.getView(); verify(p); |