Operational Defect Database

BugZero found this defect 67 days ago.

MongoDB | 2607857

timeseriesBucketingParametersHaveChanged: true gets set to false on a movePrimary

Last update date:

3/13/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...