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

Index not found error for "delete .. use index"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.1.0
    • 4.1.0, 4.5.0
    • query
    • Security Level: Public
    • None
    • 410-4824
    • Untriaged
    • Unknown

    Description

      Seeing this while testing delete from ... use index() where ..

      1. Create 1 node, travel-sample bucket with its default indexes.
      2. Check all indexes online - OK
      3. delete from default use index city - Fails with error Index not found
      4. Check index is present on system catalog tables using system:indexes and UI - OK.

      cbq> delete from default use index(def_city) where city="aaa";
      {
          "requestID": "3dfd0396-49ad-4862-9a6b-a9d66d1e1749",
          "errors": [
              {
                  "code": 5000,
                  "msg": "GSI index def_city not found."
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "1.616867ms",
              "executionTime": "1.462443ms",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
          }
      }
      cbq> select * from system:indexes where name="def_city";
      {
          "requestID": "44bf2f75-7fc4-4070-ac9b-d7771f43bf43",
          "signature": {
              "*": "*"
          },
          "results": [
              {
                  "indexes": {
                      "datastore_id": "http://127.0.0.1:8091",
                      "id": "369b8b32725efe6b",
                      "index_key": [
                          "`city`"
                      ],
                      "keyspace_id": "travel-sample",
                      "name": "def_city",
                      "namespace_id": "default",
                      "state": "online",
                      "using": "gsi"
                  }
              }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "100.149129ms",
              "executionTime": "100.060489ms",
              "resultCount": 1,
              "resultSize": 421
          }
      }
      
      

      attached logs from the node.

      Also, the query logs are in DEBUG mode.

      Attachments

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

        Activity

          People

            gerald Gerald Sangudi (Inactive)
            ketaki Ketaki Gangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty