[SERVER-37002] dropping a collection with long index names via rename fails under MMAPv1 Created: 05/Sep/18  Updated: 29/Oct/23  Resolved: 10/Sep/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: 3.6.7, 4.0.2
Fix Version/s: 3.6.8, 4.0.3, 4.1.3

Type: Bug Priority: Critical - P2
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Storage NYC 2018-09-10, Storage NYC 2018-09-24
Participants:
Case:

 Description   

In a replica set running with the storage engine MMAPv1, a collection rename with the dropTarget option set to true may fail when the destination namespace refers to a collection with long index names approaching the MMAP namespace limit of 127 characters.

The renameCollection operation would return an error with the code 10080 and a message containing the target namespace (the collection being replaced):

{
    "errmsg" : "ns name test.system.drop.1536175136i10t1.t.$aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (size: 155) too long, max size is 127 bytes",
    "code" : 10080,
    ....
}



 Comments   
Comment by Githook User [ 10/Sep/18 ]

Author:

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

Message: SERVER-37002 collection rename drops indexes with long names in the target namespace

This is already done implicitly during a two phase collection drop.
Renaming a collection with dropTarget set to true should handle long index names
in a similar manner.

(cherry picked from commit 8f37bba5a81b975101ae0ad4a0f894cce6dba648)
Branch: v3.6
https://github.com/mongodb/mongo/commit/6bc9ed599c3fa164703346a22bad17e33fa913e4

Comment by Githook User [ 10/Sep/18 ]

Author:

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

Message: SERVER-37002 collection rename drops indexes with long names in the target namespace

This is already done implicitly during a two phase collection drop.
Renaming a collection with dropTarget set to true should handle long index names
in a similar manner.

(cherry picked from commit 8f37bba5a81b975101ae0ad4a0f894cce6dba648)
Branch: v4.0
https://github.com/mongodb/mongo/commit/1efa3be56ee8a6454b6e8b0d7b68f0c6896e66e3

Comment by Githook User [ 10/Sep/18 ]

Author:

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

Message: SERVER-37002 collection rename drops indexes with long names in the target namespace

This is already done implicitly during a two phase collection drop.
Renaming a collection with dropTarget set to true should handle long index names
in a similar manner.
Branch: master
https://github.com/mongodb/mongo/commit/8f37bba5a81b975101ae0ad4a0f894cce6dba648

Generated at Thu Feb 08 04:44:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.