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

select * from system:indexes doesn't work correctly with Error state indexes

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      If there is any index in Error state, select * from system:indexes from cbq-shell doesn't show it as an Error for that index. Rather the index gets skipped and error is shown separately. The behavior is worse for query workbench which skips all valid indexes and just shows the error.

      To reproduce the issue, try to build an index during rebalance. This will cause the index to move to Error state. And try select * from system:indexes.

      In the below output, there is one valid "primary2" index and "primary1" is in Error state.

      output from cbq-shell

      cbq> select * from system:indexes;
      {
          "requestID": "fac159a9-701e-4c6b-8570-49d32d4efc82",
          "signature": {
              "*": "*"
          },
          "results": [
              {
                  "indexes": {
                      "datastore_id": "http://127.0.0.1:9000",
                      "id": "793a4c9fdeca544a",
                      "index_key": [],
                      "is_primary": true,
                      "keyspace_id": "default",
                      "name": "primary1",
                      "namespace_id": "default",
                      "state": "online",
                      "using": "gsi"
                  }
              }
          ],
          "errors": [
              {
                  "code": 12014,
                  "msg": "error: Indexer Cannot Process Build Index - Rebalance In Progress\n. Index primary2([]). Index state: deferred"
              }
          ],
          "status": "errors",
          "metrics": {
              "elapsedTime": "17.045247ms",
              "executionTime": "17.017772ms",
              "resultCount": 1,
              "resultSize": 405,
              "errorCount": 1
          }
      }
      

      output from query workbench

      [
        {
          "code": 12014,
          "msg": "error: Indexer Cannot Process Build Index - Rebalance In Progress\n. Index primary2([]). Index state: deferred"
        }
      ]
      
      

      Need to make sure GSIClient is returning the Error information as per the protocol before this issue can be passed to the query team.

      Attachments

        Issue Links

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

          Activity

            People

              prathibha Prathibha Bisarahalli (Inactive)
              deepkaran.salooja Deepkaran Salooja
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty