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

Use Specific Error Code for Index Not Found

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.1.0
    • 4.0.0
    • secondary-index
    • Security Level: Public
    • Untriaged
    • Unknown

    Description

      Currently, the code 5000 is used for an index not found condition. It would be preferable to return this specific code:
      https://github.com/couchbase/query/blob/master/errors/ds_couchbase.go#L106
      given that this will occur if the indexes used by a prepared statement are deleted/unavailable. See the sequence below for an example.

      cbq> prepare foo as select name, callsign from `travel-sample` where icao = "CAN"

      cbq> drop index `travel-sample`.def_icao;

      cbq> execute foo ;
      {
      "requestID": "2ddd790a-9416-465b-b201-344e79f3f45c",
      "signature": null,
      "results": [
      ],
      "errors": [

      { "code": 5000, "msg": "index deleted or node hosting the index is down - cause: queryport.indexNotFound" }

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

      { "elapsedTime": "637.517µs", "executionTime": "562.341µs", "resultCount": 0, "resultSize": 0, "errorCount": 1 }

      }

      Attachments

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

        Activity

          People

            prasanna.gholap Prasanna Gholap [X] (Inactive)
            colm Colm Mchugh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty