Operational Defect Database

BugZero found this defect 80 days ago.

MongoDB | 2593890

Skipping if local non-timeseries collection exists check when creating a sharded timeseries collection

Last update date:

3/14/2024

Affected products:

MongoDB Server

Affected releases:

5.0.0

6.0.0

7.0.0

7.1.0

7.3.0-rc0

7.2.0

Fixed releases:

No fixed releases provided.

Description:

Info

Currently, we can create a sharded timeseries collection even if that collection already exists as an unsharded non-timeseries collection. That's because we are skipping the check to local catalog collection options when the create request is not unsplittable.

Top User Comments


Steps to Reproduce

assert.commandWorked(db.runCommand({create: coll.getName()})); // Following shard command doesn't return an error but has to. assert.commandFailedWithErrorCode(db.adminCommand({ shardCollection: coll.getFullName(), key: {time: 1}, timeseries: {timeField: 'time', metaField: 'meta'} }), [ErrorCodes.NamespaceExist]);

Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Backlog

Learn More

Search:

...