mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
for testing
This commit is contained in:
parent
c7417ff16c
commit
d48a16161e
@ -133,8 +133,8 @@ namespace mongo {
|
||||
boost::filesystem::path nsPath = path();
|
||||
string pathString = nsPath.string();
|
||||
MMF::Pointer p;
|
||||
if( MMF::exists(nsPath) ) {
|
||||
p = f.map(pathString.c_str());
|
||||
if( MMF::exists(nsPath) ) {
|
||||
p = f.mapWithOptions(pathString.c_str(), durable?MMF::READONLY:0);
|
||||
if( !p.isNull() ) {
|
||||
len = f.length();
|
||||
if ( len % (1024*1024) != 0 ){
|
||||
@ -148,7 +148,7 @@ namespace mongo {
|
||||
massert( 10343 , "bad lenForNewNsFiles", lenForNewNsFiles >= 1024*1024 );
|
||||
maybeMkdir();
|
||||
unsigned long long l = lenForNewNsFiles;
|
||||
p = f.map(pathString.c_str(), l);
|
||||
p = f.map(pathString.c_str(), l, durable?MMF::READONLY:0);
|
||||
if( !p.isNull() ) {
|
||||
len = l;
|
||||
assert( len == lenForNewNsFiles );
|
||||
|
8
pch.h
8
pch.h
@ -93,6 +93,14 @@
|
||||
|
||||
namespace mongo {
|
||||
|
||||
/* this likely goes away later. to facilitate testing for a while without impacting other things. */
|
||||
#if defined(_DURABLE)
|
||||
const bool durable = true;
|
||||
#error don't use this yet
|
||||
#else
|
||||
const bool durable = false;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using boost::shared_ptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user