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

Indexes don't show up on UI after indexer process is killed multiple times

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 4.0.0
    • secondary-index
    • Security Level: Public
    • None

    Description

      Setup cluster of cb server as following:
      a) Node1 - KV - .182
      b) Node2 - Indexer - .183
      c) Node3 - n1ql - .184

      1. Create default bucket and load 5000 documents
      2. Create primary index and a secondary index.
      – Check via UI and query to system:indexes
      3. Create another bucket default1 and load 5000 documents
      4. Try and create primary index on default1, in parallel kill the indexer process on the indexer node.
      Do step 4 multiple times. You will see a trace as following.
      5. Now via UI check the index tab, the index tab will be empty.
      6. Restart CB server on indexer node and check for index tab. Index tab is still empty.

      Expected Results:
      Index tab should show all index created for default bucket.

      Actual Result:
      Index tab shows nothing.

      Time to co-relate in logs - Sat May 23 05:44:08 2015 - Sat May 23 06:20:00 2015

      ---Error while creating index on default1 bucket.
      cbq> create primary index on default1 using gsi;
      {
      "requestID": "45b04cd5-6807-4b50-bf09-553e905fab5c",
      "signature": null,
      "results": [
      ],
      "errors": [

      { "code": 5000, "msg": "GSI CreatePrimaryIndex() - cause: Terminate Request due to server termination" }

      ],
      "status": "errors",
      "metrics":

      { "elapsedTime": "17.085521672s", "executionTime": "17.084890068s", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      cbq> create primary index on default1 using gsi;
      {
      "requestID": "85524e9b-378f-4018-9ded-adfbcf9c3c03",
      "signature": null,
      "results": [
      ],
      "errors": [

      { "code": 5000, "msg": "GSI CreatePrimaryIndex() - cause: Index default1.#primary already exist" }

      ],
      "status": "errors",
      "metrics":

      { "elapsedTime": "15.037661823s", "executionTime": "15.037041963s", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      -----------------------------------------
      Output of the query command which shows indexes for bucket default:
      cbq> select * from system:indexes;
      {
      "requestID": "bcd9b6c1-5316-4e87-8611-fdedaae08b54",
      "signature":

      { "*": "*" }

      ,
      "results": [
      {
      "indexes":

      { "datastore_id": "http://127.0.0.1:8091", "id": "#primary", "index_key": [ "(meta(`default`).`id`)" ], "is_primary": true, "keyspace_id": "default", "name": "#primary", "namespace_id": "default", "state": "online", "using": "view" }

      },
      {
      "indexes":

      { "datastore_id": "http://127.0.0.1:8091", "id": "d31f49bc6a1f4211", "index_key": [ "`name`" ], "keyspace_id": "default", "name": "index_1", "namespace_id": "default", "state": "online", "using": "gsi" }

      },
      {
      "indexes":

      { "datastore_id": "http://127.0.0.1:8091", "id": "4619a193ce75bf18", "index_key": [], "is_primary": true, "keyspace_id": "default", "name": "#primary", "namespace_id": "default", "state": "online", "using": "gsi" }

      }
      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "135.645956ms", "executionTime": "135.004706ms", "resultCount": 3, "resultSize": 1279 }

      }

      Attachments

        For Gerrit Dashboard: MB-15121
        # Subject Branch Project Status CR V

        Activity

          People

            prataprc Pratap Chakravarthy (Inactive)
            ritam.sharma Ritam Sharma
            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