[SERVER-64491] Reconsider allowing the system.js collection to be renamed Created: 14/Mar/22  Updated: 29/Oct/23  Resolved: 06/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Andrii Dobroshynski (Inactive) Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-64458 system.js can be sharded via rename Closed
Related
related to SERVER-64458 system.js can be sharded via rename Closed
related to SERVER-5972 Cannot drop system.js collection Closed
is related to SERVER-41947 Disallow using the "system.views" col... Closed
is related to SERVER-157 stored js libraries Closed
is related to SERVER-29453 Disallow removing the featureCompatib... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-06-13
Participants:

 Description   

As part of work onĀ SERVER-61893 we noticed that it is currently not permissible to drop and re-create the `system.js` collection but it is possible to rename it. Given that other system collections are not allowed to be renamed, perhaps it is worth to reconsider this behavior and ban the system.js collection from being renamed.



 Comments   
Comment by Githook User [ 04/Jun/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-64491 Disallow using the system.js collection name as the source or target names in the rename command
Branch: master
https://github.com/mongodb/mongo/commit/aca68462e5b703b3cc54e4610604687150706f20

Comment by Githook User [ 03/Jun/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-64491 remove system.js renames from change streams test for

{showSystemEvents: true}

Branch: master
https://github.com/mongodb/mongo/commit/d609d0a9a85c19416a95b537aaaba02f3c89032c

Comment by Githook User [ 02/Jun/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-64491 add rename test case for system.js to storefunc.js to show current behavior
Branch: master
https://github.com/mongodb/mongo/commit/7565cf3af5bf2cc3f32e3ffc5928729d4357b389

Comment by Benety Goh [ 02/Jun/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-64491 add NamespaceString::isSystemDotJavascript()
Branch: master
https://github.com/mongodb/mongo/commit/506083fa9105a86207dad809c719346ab3c1741f

(incorrectly attributed to SERVER-64991)

Comment by Githook User [ 01/Jun/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-64491 clean up storefunc.js. remove requires_fastcount tag
Branch: master
https://github.com/mongodb/mongo/commit/4d6a40567f2d18fd10dbe6d2272fbe648be1a459

Comment by Benety Goh [ 31/May/22 ]

We have another example of a system namespace (system.views) that is rejected by renameCollection in SERVER-41947.

Comment by Benety Goh [ 31/May/22 ]

We did something similar for admin.system.version in SERVER-29453 where the server would return a ErrorCodes.IllegalOperation error.

Comment by Connie Chen [ 18/Apr/22 ]

yes we should ban system.js from being renamed.

Generated at Thu Feb 08 06:00:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.