Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-41836

Increase collection and scope name length from 30 to 251 bytes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.0
    • master
    • couchbase-bucket
    • None
    • Triaged
    • 1
    • No

    Description

      Currently 30 bytes is the limit (hangover from an implementation that embedded collection name into the key).

      From slack (Lior King) this needs increasing.

      I’ve just realised that there is a limit to the collections and scope names in Couchbase - up to 30 characters.

      This limitation might cast problems for people migrating from other databases:

      • MongoDB - Maximum collection name length is 120 characters on Mongo 4.2 and 255 character on MongoDB 4.4.
      • Oracle 12.2 and above - maximum object name length is 128 characters.
      • SQL Server - 128 characters.
      • MySQL - 64 characters.
      • Postgres - 63 characters.

      I think the 30 character limitation is too low - especially for collections names (scope names are less problematic).

      Is there any way this limitation can be changed ?

      Note that the quoted mongo limit is not accurate, that is the max of a namespace which includes the collection name as part of that total.

      From KV, we place the collection/scope name into the key field of some protocol messages (DCP system event) and that field has a 1 byte length, allowing a maximum of 255 bytes to be defined, however that field is already 'validated' upto a maximum of 251 (as it is also shared with document keys). 251 gives plenty of options for escaping and future growth.

      Plan - Move

      • collection name maximum length to be 251 bytes.
      • scope name maximum length to be 251 bytes.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jwalker Jim Walker
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty