[SERVER-59666] Renaming system.buckets collection should be disallowed Created: 30/Aug/21  Updated: 29/Oct/23  Resolved: 27/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Arun Banala Assignee: Reo Kimura (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-61589 Disallow users from creating collecti... Closed
is related to SERVER-60497 renameCollectionForApplyOps should sk... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Steps To Reproduce:

MongoDB Enterprise > db.createCollection("ts", {timeseries: {timeField: 't'}})

{ "ok" : 1 }

MongoDB Enterprise > db.adminCommand(

{renameCollection: "test.system.buckets.ts", to: "test.otherColl", dropTarget: false}

)

{ "ok" : 1 }

MongoDB Enterprise > db.getCollectionInfos()
uncaught exception: Error: error doing query: failed: network error while attempting to run command 'listCollections' on host '127.0.0.1:27017' :
DB.prototype.runCommand@src/mongo/shell/db.js:177:19
DB.prototype._getCollectionInfosCommand@src/mongo/shell/db.js:691:17
DB.prototype.getCollectionInfos@src/mongo/shell/db.js:741:16
@(shell):1:1

Sprint: Execution Team 2021-09-20, Execution Team 2021-10-04
Participants:

 Description   

Renaming system.buckets seems to corrupt the collection metadata, causing a server crash when listCollections command is issue.



 Comments   
Comment by Githook User [ 15/Oct/21 ]

Author:

{'name': 'Reo Kimura', 'email': 'reo.kimura@mongodb.com', 'username': 'rkimura21'}

Message: SERVER-59666 Disallow renaming system.buckets collections

(cherry picked from commit e981f68b35c273faec7b82961460e96998d29bfc)
Branch: v5.0
https://github.com/mongodb/mongo/commit/31daf9eab9edaa06f93f5c29e088c4241938049e

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Reo Kimura', 'email': 'reo.kimura@mongodb.com', 'username': 'rkimura21'}

Message: SERVER-59666 Disallow renaming system.buckets collections
Branch: master
https://github.com/mongodb/mongo/commit/e981f68b35c273faec7b82961460e96998d29bfc

Generated at Thu Feb 08 05:47:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.