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

Indexer returns the incorrect definition when defer_build:true is used.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 5.0.0
    • 4.5.1
    • secondary-index
    • None
    • Untriaged
    • Unknown

    Description

      In the UI the index definition is incorrect when using deferred build option:

      The index definition had an equals sign when a colon is expected.

      What the UI displays:

      CREATE INDEX `beer-sample-type-index` ON `beer-sample`(`type`) WITH { "defer_build"=true }
      

      What it should display:

      CREATE INDEX `beer-sample-type-index` ON `beer-sample`(`type`) WITH { "defer_build":true }
      

      Steps to reproduce:

      1. Enabled the beer-sample bucket
      2. Create the following index

        CREATE INDEX `beer-sample-type-index` ON `beer-sample`(`type`) WITH { "defer_build"=true };
        

      3. Check the UI.

      The reasoning why I have assigned this case to the GSI team is that in the couchbase.log in the cbcollect I can see that the indexer is returning the incorrect definition:

      ==============================================================================
      Index definitions are:
      ['curl', '-sS', '--proxy', '', '-u', '@:*****', 'http://127.0.0.1:9102/getIndexStatus']
      ==============================================================================
      {"code":"success","status":[
       
      {"defnId":14247423600953819495,
      "name":"beer-sample-type-index",
      "bucket":"beer-sample",
      "secExprs":["`type`"],
      "indexType":"memory_optimized",
      "status":"Ready",
      "definition":"CREATE INDEX `beer-sample-type-index` ON `beer-sample`(`type`) WITH {  \"defer_build\"=true }","hosts": ["127.0.0.1:8091"],"completion":100},
       
      {"defnId":2281373320683997496,
      "name":"beer_primary",
      "bucket":"beer-sample",
      "isPrimary":true,
      "indexType":"memory_optimized",
      "status":"Ready",
      "definition":"CREATE PRIMARY INDEX `beer_primary` ON `beer-sample`","hosts":["127.0.0.1:8091"],"completion":100}]} 
      

      Attachments

        Issue Links

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

          Activity

            People

              pvarley Patrick Varley (Inactive)
              pvarley Patrick Varley (Inactive)
              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