-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
Fully Compatible
-
ALL
-
v7.3, v7.0, v6.0, v5.0
-
-
CAR Team 2024-04-01
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}));
- is related to
-
SERVER-76547 Create command on a time-series collection is not idempotent
- Closed