diff options
author | Dwight <dmerriman@gmail.com> | 2008-07-24 16:07:29 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2008-07-24 16:07:29 -0400 |
commit | 20c7cf953ad19a04e128c39730df22371050b68f (patch) | |
tree | 25205654de83adbbde48d3bae48d1bf7025aedbf | |
parent | 24fdaa1ed9952cc3d875e652242ff9432be753a3 (diff) | |
parent | 517956ab6056e0a378b4f33e82d62ee018bfef79 (diff) | |
download | mongo-20c7cf953ad19a04e128c39730df22371050b68f.tar.gz |
Merge branch 'master' of ssh://git.10gen.com/data/gitroot/p
-rw-r--r-- | db/pdfile.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/db/pdfile.cpp b/db/pdfile.cpp index 70f88909802..f9fc1250440 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -444,7 +444,7 @@ bool userCreateNS(const char *ns, JSObj& j, string& err) { void PhysicalDataFile::open(int fn, const char *filename) { int length; - + if( fn <= 4 ) { length = (64*1024*1024) << fn; if( strstr(filename, "alleyinsider") && length < 1024 * 1024 * 1024 ) { @@ -454,8 +454,19 @@ void PhysicalDataFile::open(int fn, const char *filename) { } } else length = 0x7ff00000; + + assert( length >= 64*1024*1024 ); + + if( strstr(filename, "_hudsonSmall") ) { + int mult = 1; + if ( fn > 1 && fn < 1000 ) + mult = fn; + length = 1024 * 512 * mult; + cout << "Warning : using small files for _hudsonSmall" << endl; + } + - assert( length >= 64*1024*1024 && length % 4096 == 0 ); + assert( length % 4096 == 0 ); assert(fn == fileNo); header = (PDFHeader *) mmf.map(filename, length); |