summaryrefslogtreecommitdiff
path: root/jstests/mmap_v1
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2015-02-17 18:20:42 -0500
committerMathias Stearn <mathias@10gen.com>2015-02-19 19:55:44 -0500
commitae18bbec33db1c4bf57d328505474eb7bba517df (patch)
treed40f788493b48acc2d65e1c002ce4adf41e0313f /jstests/mmap_v1
parent30d9e17410a3dec85ca2a148c745a6b8f9a8ecd0 (diff)
downloadmongo-ae18bbec33db1c4bf57d328505474eb7bba517df.tar.gz
SERVER-17312 collmod command now handles parsing of all arguments
For the two currently supported engine-specific options, the collmod command will handle parsing the arguments and tell the CollectionCatalogEntry to update it's flags option. This removes the ability of storage engines to have custom options that can be changed after the collection is created. There were issues related to argument validation and replication of changes (including for initial sync). A correct solution will be designed as SERVER-17320.
Diffstat (limited to 'jstests/mmap_v1')
-rw-r--r--jstests/mmap_v1/use_power_of_2_a.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/jstests/mmap_v1/use_power_of_2_a.js b/jstests/mmap_v1/use_power_of_2_a.js
index a1cd48bd2b6..598655429d0 100644
--- a/jstests/mmap_v1/use_power_of_2_a.js
+++ b/jstests/mmap_v1/use_power_of_2_a.js
@@ -10,20 +10,23 @@ function test(defaultMode) {
db.createCollection('b', {usePowerOf2Sizes: false});
assert.eq(db.b.stats().userFlags & 1, 0);
- // capped should be 0
+ // Capped collections now behave like regular collections in terms of userFlags. Previously they
+ // were always 0, unless collmod was used.
+
+ // capped should obey default (even though it is ignored)
db.c.drop();
db.createCollection('c', {capped:true, size: 10});
- assert.eq(db.c.stats().userFlags & 1, 0);
+ assert.eq(db.c.stats().userFlags & 1, defaultMode);
- // capped should be 0
+ // capped explicitly off should be 0
db.d.drop();
db.createCollection('d', {capped:true, size: 10, usePowerOf2Sizes: false});
assert.eq(db.d.stats().userFlags & 1, 0);
- // capped and ask explicitly for powerOf2 should be 0
+ // capped and ask explicitly for powerOf2 should be 1
db.e.drop();
db.createCollection('e', {capped:true, size: 10, usePowerOf2Sizes: true});
- assert.eq(db.e.stats().userFlags & 1, 0);
+ assert.eq(db.e.stats().userFlags & 1, 1);
}
assert.eq(db.adminCommand({getParameter:1,