BugZero found this defect 80 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/14/2024
MongoDB Server
5.0.0
6.0.0
7.0.0
7.1.0
7.3.0-rc0
7.2.0
No fixed releases provided.
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.
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]);