
OPERATIONAL DEFECT DATABASE
...

...
We have a two shard cluster. Create a timeseries collection on it, and then modify the bucketing params: mongos> db.createCollection( "tscoll", { timeseries: { timeField: "timestamp", bucketMaxSpanSeconds: 100, bucketRoundingSeconds: 100 } } ) mongos> db.runCommand({ collMod: "tscoll", timeseries: { bucketRoundingSeconds: 201, bucketMaxSpanSeconds: 201 } }) We can see that the timeseriesBucketingParametersHaveChanged is set to true: mongos> use admin mongos> db.aggregate([{$listCatalog: {}}, {$match: {name: /buckets.tscoll/}}]).pretty() { "db" : "test", "name" : "system.buckets.tscoll", "type" : "collection", "shard" : "shard-rs1", "md" : { "ns" : "test.system.buckets.tscoll", "options" : { ... "timeseries" : { "timeField" : "timestamp", "bucketRoundingSeconds" : 201, "bucketMaxSpanSeconds" : 201 } }, "indexes" : [ ], "timeseriesBucketsMayHaveMixedSchemaData" : false, "timeseriesBucketingParametersHaveChanged" : true }, "idxIdent" : { }, "ns" : "test.system.buckets.tscoll", "ident" : "collection-50-2538635120092599498" } Initiate movePrimary: mongos> db.adminCommand({movePrimary: 'test', to: 'shard-rs0'}) mongos> use admin mongos> db.aggregate([{$listCatalog: {}}, {$match: {name: /buckets.tscoll/}}]).pretty() { "db" : "test", "name" : "system.buckets.tscoll", "type" : "collection", "shard" : "shard-rs0", "ns" : "test.system.buckets.tscoll", "ident" : "collection-59-3693464124440949550", "md" : { "ns" : "test.system.buckets.tscoll", "options" : { ... "clusteredIndex" : true, "timeseries" : { "timeField" : "timestamp", "bucketRoundingSeconds" : 201, "bucketMaxSpanSeconds" : 201 } }, "indexes" : [ ], "timeseriesBucketsMayHaveMixedSchemaData" : false, "timeseriesBucketingParametersHaveChanged" : false } } Found on base commit: cdbd4b3f1c03cac745e81f3b7d538775ce78992d
pierlauro.sciarelli commented on Wed, 28 Aug 2024 06:56:21 +0000: Closing because SERVER-91195 added the required catalog support for users to fix potentially inconsistent catalog parameters via collMod and for cloning procedures to properly mirror the previously missing options. A procedure to stabilize affected collections is going to be made public shortly (more details in SERVER-93381).
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.