BugZero found this defect 60 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/20/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
Direct creation of bucket collection with timeseries options is supported and currently used by mongosync and $out. The problem is that today this operation is not idempotent, consider the following scenario as an example: // Create a bucket collection with timeseries options assert.commandWorked(db.createCollection('system.buckets.coll', {timeseries: tsOptions})); // If we run the same operation again it will fail assert.commandWorked(db.createCollection('system.buckets.coll', {timeseries: tsOptions})); We also have an additional problem, if we first create the bucket collection with timeseries options, then the creation of a timeseries collection on the main namespace does not work. E.g.: // Create a bucket collection with timeseries options assert.commandWorked(db.createCollection('system.buckets.coll', {timeseries: tsOptions})); // If we attempt to create the timeseries collection afteward it will fail assert.commandWorked(db.createCollection('coll', {timeseries: tsOptions}));
// Create a bucket collection with timeseries options assert.commandWorked(db.createCollection('system.buckets.coll', {timeseries: tsOptions})); // If we run the same operation again it will fail assert.commandWorked(db.createCollection('system.buckets.coll', {timeseries: tsOptions}));