Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32959

Remove index name length limit

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.1
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Epic Link:
    • Sprint:
      Storage NYC 2018-07-02
    • 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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: