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

[BP MB-36282 to 6.0.4] alter index of partitioned index renders the index unusable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.0.4
    • 5.5.0, 6.0.0
    • secondary-index
    • None
    • Untriaged
    • Unknown

    Description

      1. Create a partitioned index on 2 nodes

      CREATE INDEX idx1 on default(name) PARTITION BY HASH(meta().id) with {"nodes": ["10.100.172.173:9000","127.0.0.1:9001"]}

       

      2. Move to 2 different nodes

      ALTER INDEX default.idx1 WITH {"action":"move", "nodes": ["127.0.0.1:9002", "127.0.0.1:9003"]}

       

      3. Try scanning the index:

       

      SELECT name FROM default WHERE name IS NOT NULL
      [

      { "code": 4000, "msg": "No index available on keyspace default that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.", "query": "SELECT name FROM default WHERE name IS NOT NULL" }

      ]

       4. Try to drop the index

       

      { "code": 5000, "msg": "GSI index idx1 not found.", "query": "DROP INDEX default.idx1" }

       

      5. Move back to original nodes

      ALTER INDEX default.idx1 WITH {"action":"move", "nodes": ["10.100.172.173:9000","127.0.0.1:9001"]}

       

      { "code": 5000, "msg": "GSI index idx1 not found.", "query": "ALTER INDEX default.idx1 WITH \{\"action\":\"move\", \"nodes\": [\"10.100.172.173:9000\",\"127.0.0.1:9001\"]}

      "
      }
      gsiclient doesn't seem to have the metadata of the index anymore. Restarting the cbq-engine makes it work again.

       
      Note: This is not an issue with non-partitioned index
       

      Attachments

        Issue Links

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

          Activity

            People

              ajay.bhullar Ajay Bhullar
              prathibha Prathibha Bisarahalli (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty