diff options
author | Jason Rassi <rassi@10gen.com> | 2013-02-20 10:34:19 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2013-02-20 16:36:28 -0500 |
commit | 6ddad8c0d34bdd0e1c08a85cf35b1fd0f0f235e2 (patch) | |
tree | 23d323979b2b07d704f22b5f65216e07b9e2a8d2 /jstests | |
parent | 3131bfba5e3d4fefcc8c9cf38bce54393606849e (diff) | |
download | mongo-6ddad8c0d34bdd0e1c08a85cf35b1fd0f0f235e2.tar.gz |
SERVER-8418 Enable usePowerOf2Sizes on collection upon text index creation.
Signed-off-by: Andy Schwerin <schwerin@10gen.com>
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/fts1.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/fts1.js b/jstests/fts1.js index bd464eb4b41..bc8c7581909 100644 --- a/jstests/fts1.js +++ b/jstests/fts1.js @@ -9,7 +9,12 @@ t.save( { _id : 2 , x : "az b" } ); t.save( { _id : 3 , x : "b c" } ); t.save( { _id : 4 , x : "b c d" } ); +assert.eq(t.stats().userFlags, 0, + "A new collection should not have power-of-2 storage allocation strategy"); t.ensureIndex( { x : "text" } ); +assert.eq(t.stats().userFlags, 1, + "Creating a text index on a collection should change the allocation strategy " + + "to power-of-2."); assert.eq( [1,2,3,4] , queryIDS( t , "c az" ) , "A1" ); assert.eq( [4] , queryIDS( t , "d" ) , "A2" ); |