[SERVER-32959] Remove index name length limit Created: 29/Jan/18  Updated: 29/Oct/23  Resolved: 28/Jun/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.1

Type: Improvement Priority: Minor - P4
Reporter: Mark Brinsmead Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
is documented by DOCS-11906 Docs for SERVER-32959: Remove index n... Closed
Related
related to SERVER-35824 support for long index namespaces sho... Closed
is related to TOOLS-2497 mongorestore may incorrectly validate... Closed
is related to SERVER-38075 Increase namespace size Closed
is related to SERVER-29747 Two phase drops: drop indexes before ... Closed
is related to SERVER-35752 Ensure tests that rely on FCV pass af... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-07-02
Participants:
Case:
Linked BF Score: 19

 Description   

As described in https://docs.mongodb.com/v3.4/reference/limits/#indexes, mongod inforces a limits of 128 characters for the combination of index_name and database_name when creating indexes. (Similar restrictions apply to collection names for the creation of collections.)

This can cause errors when unloading / reloading data (e.g., with mongodump and mongorestore) to create test environments in which the database names may differ from the original source.

For example, when unloading data/indexes from a production database named abc and loading into a database named abc-uat-2018jan29 for testing purposes, index names that had been legal in the source database may no longer be legal in the destination database.

Although this can be resolved by renaming indexes, doing so violates testing protocols, as hinted queries will no longer function equivalently (without change) in both environments.

To overcome this, it would be helpful if separate and independent limits were enforced on database names and on index / collection names; this would ensure that any collection or indexe that can be successfully created in one database can be exported and imported into any other database.



 Comments   
Comment by Githook User [ 28/Jun/18 ]

Author:

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

Message: SERVER-32959 collection renames are no longer constrained by names of indexes
Branch: master
https://github.com/mongodb/mongo/commit/edff161ae08327f17f284bac638bdebc72404421

Comment by Githook User [ 28/Jun/18 ]

Author:

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

Message: SERVER-32959 remove limit on index namespace at index creation
Branch: master
https://github.com/mongodb/mongo/commit/f03234dd850f45feef0e778e8eaa117b7c9cf41e

Comment by Githook User [ 27/Jun/18 ]

Author:

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

Message: SERVER-32959 clean up tests before removing index namespace constraints

add RenameCollectionTest test case for long collection name
clean up long_index_rename.js
clean up ns_length.js
clean up rename6.js
Branch: master
https://github.com/mongodb/mongo/commit/a3e1ba4eb1798def823ada738f96b42e5417adee

Comment by Benety Goh [ 26/Jun/18 ]

There's additional upgrade/downgrade work that needs to be addressed after SERVER-35752 is completed.

Comment by Eric Milkie [ 18/Jun/18 ]

This ticket will be to do the work for removing index name limits.

Comment by Eric Milkie [ 29/Jan/18 ]

Index name length limits can be raised or removed once the mmapv1 storage engine has been removed from MongoDB; the removal is currently scheduled for version 4.2.

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