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

Populate error back to eventing log when underlying service throws error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.0.0
    • 5.5.0
    • eventing
    • local vagrant box
    • Untriaged
    • Ubuntu 64-bit
    • Unknown

    Description

      • Run 4 node server kv ,eventing ,indexer, query
      • Create a handler with N1QL query and deploy the code

      function OnUpdate(doc, meta) {
      log('document', doc);
      try {
      var sel=SELECT * from src_bucket where mutated=0 limit 1;
      var res=sel.execQuery();
      dst_bucket["select"]=res;
      log("res", res);
      log("metadata", res.metadata);
      dst_bucket["result"]=res.metadata.metrics.resultCount;
      } catch (e) {
      log(e);
      }
      }

      * Now remove query node from cluster

      • Create a mutation 
      • Open debugger to see the exception but there is no exception and response is empty from N1QL query

      Expected :  We should return the same error whatever underlying service is giving.

      In this case error from sdk is 

      Traceback (most recent call last):
      File "a.py", line 10, in <module>
      for row in bucket.n1ql_query(query):
      File "/Library/Python/2.7/site-packages/couchbase/n1ql.py", line 472, in __iter__
      self._start()
      File "/Library/Python/2.7/site-packages/couchbase/n1ql.py", line 386, in _start
      self._mres = self._submit_query()
      File "/Library/Python/2.7/site-packages/couchbase/n1ql.py", line 380, in _submit_query
      cross_bucket=self._params.cross_bucket)
      couchbase.exceptions.NotSupportedError: <RC=0x13[Operation not supported], Couldn't schedule n1ql query, C Source=(src/n1ql.c,87)>

      Similar case observe when bucket is deleted and we are using alias for it in handler code.

      Attachments

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

        Activity

          People

            vikas.chaudhary Vikas Chaudhary
            vikas.chaudhary Vikas Chaudhary
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  PagerDuty