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

[CX] Index can be created by user on meta() fields

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 6.0.0
    • 6.0.1
    • analytics
    • Untriaged
    • Unknown
    • CX Sprint 133

    Description

      Currently an Index can be created by user on meta() fields. This is problematic if the field is the "id" field as we'd create an index that's never used by the system and it's not useful for the other fields.

      Attachments

        Issue Links

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

          Activity

            Hi Tanzeem Ahmed

            Please test the fix for creating an index on meta fields. This is now disallowed. The verification is to try creating an index on meta fields. Here is an example:

            CREATE INDEX idx ON dataset1(meta().id); 

             

            ali.alsuliman Ali Alsuliman added a comment - Hi  Tanzeem Ahmed Please test the fix for creating an index on meta fields. This is now disallowed. The verification is to try creating an index on meta fields. Here is an example: CREATE INDEX idx ON dataset1(meta().id);  

            As meta().id is a special case (being the key of the object) we should also test other fields.

            till Till Westmann added a comment - As meta().id is a special case (being the key of the object) we should also test other fields.

            Index creation on all meta() fields now fails with below error 

            Compilation error: Cannot create index on meta fields
            

            Till Westmann,
            Verified for all meta fields id/vbid/seq/cas/flags. Also, verified Composite Secondary Index with 1 fields from meta

            CREATE INDEX id_sec ON ds (brewery_id:string, meta().cas);
            

            tanzeem.ahmed Tanzeem Ahmed (Inactive) added a comment - Index creation on all meta() fields now fails with below error  Compilation error: Cannot create index on meta fields Till Westmann , Verified for all meta fields id/vbid/seq/cas/flags. Also, verified Composite Secondary Index with 1 fields from meta CREATE INDEX id_sec ON ds (brewery_id:string, meta().cas);

            People

              tanzeem.ahmed Tanzeem Ahmed (Inactive)
              till Till Westmann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty