BugZero found this defect 39 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/10/2024
MongoDB Server
5.0.0
6.0.0
7.0.0
8.0.0-alpha1
No fixed releases provided.
renaming a timeseries bucket collection is currently allowed (under special priviledges) and also used internally by $out. The problem is that when we execute a rename of a timeseries bucket collection we do not check if a collection already exist on the target main namespace. For instance, if we do the following: db.createCollection( 'srcColl', { timeseries: { timeField: "timestamp", metaField: "metadata" } }) db.createCollection( 'dstColl') db.system.buckets.srcColl.renameCollection(system.buckets.dstColl); The rename should fail because the target collection already exists and instead it works leaving the local catalog with both normal collection 'db.dstColl' and timeseries bucket collection 'db.system.buckets.dstColl' We should extend jstests/core/rename_system_buckets_collections.js to cover those scenarios.
db.createCollection( 'srcColl', { timeseries: { timeField: "timestamp", metaField: "metadata" } }) db.createCollection( 'dstColl') db.system.buckets.srcColl.renameCollection(system.buckets.dstColl);