diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-12-01 15:19:01 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-12-01 17:41:33 -0500 |
commit | 7e4de6184d876b7963946708d6e83ee57335211f (patch) | |
tree | 9319101e8a28195b6e7ff55afeda6a7e375c4e27 /jstests/noPassthrough/split_collections_and_indexes.js | |
parent | 23fad5ee3e26b8d107401e4bfad86f9ada7b7d1f (diff) | |
download | mongo-7e4de6184d876b7963946708d6e83ee57335211f.tar.gz |
ERVER-965: Store the indexes of a collection on another partition/drive than the documents
Diffstat (limited to 'jstests/noPassthrough/split_collections_and_indexes.js')
-rw-r--r-- | jstests/noPassthrough/split_collections_and_indexes.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/jstests/noPassthrough/split_collections_and_indexes.js b/jstests/noPassthrough/split_collections_and_indexes.js new file mode 100644 index 00000000000..fad6478a0cd --- /dev/null +++ b/jstests/noPassthrough/split_collections_and_indexes.js @@ -0,0 +1,18 @@ + +if ( jsTest.options().storageEngine && + jsTest.options().storageEngine.toLowerCase() == "wiredtiger" ) { + + var baseDir = "jstests_split_c_and_i"; + port = allocatePorts( 1 )[ 0 ]; + dbpath = MongoRunner.dataPath + baseDir + "/"; + + var m = startMongodTest(port, baseDir, false, {wiredTigerDirectoryForIndexes : ""} ); + db = m.getDB( "foo" ); + db.bar.insert( { x : 1 } ); + assert.eq( 1, db.bar.count() ); + + db.adminCommand( {fsync:1} ); + + assert( listFiles( dbpath + "/index" ).length > 0 ); + assert( listFiles( dbpath + "/collection" ).length > 0 ); +} |