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

[BP to 7.1.6-MP1 & 7.2.3-MP1] In predicate with udf slow/hang

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.1.7
    • 7.6.0, 7.1.7
    • query
    • 7.1.5-3885
    • Untriaged
    • 0
    • Unknown

    Description

      Following regression test is hanging/times out:

      2023-09-22 20:04:22 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] RUN QUERY CREATE OR REPLACE FUNCTION func4(doctype) { (SELECT RAW city FROM `travel-sample` WHERE type = doctype) }
      2023-09-22 20:04:22 | INFO | MainProcess | test_thread | [rest_client.query_tool] query params : statement=CREATE+OR+REPLACE+FUNCTION+func4%28doctype%29+%7B+%28SELECT+RAW+city+FROM+%60travel-sample%60+WHERE+type+%3D+doctype%29+%7D&scan_consistency=REQUEST_PLUS
      2023-09-22 20:04:22 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] TOTAL ELAPSED TIME: 50.130921ms
      2023-09-22 20:04:22 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] RUN QUERY SELECT t1.city FROM `travel-sample` t1 WHERE t1.type = "landmark" AND t1.city IN func4("airport")
      2023-09-22 20:04:22 | INFO | MainProcess | test_thread | [rest_client.query_tool] query params : statement=SELECT+t1.city+FROM+%60travel-sample%60+t1+WHERE+t1.type+%3D+%22landmark%22+AND+t1.city+IN+func4%28%22airport%22%29&scan_consistency=REQUEST_PLUS
      2023-09-22 20:26:02 | ERROR | MainProcess | test_thread | [rest_client._http_request] socket error while connecting to http://172.23.109.127:8093/query?statement=SELECT+t1.city+FROM+%60travel-sample%60+t1+WHERE+t1.type+%3D+%22landmark%22+AND+t1.city+IN+func4%28%22airport%22%29&scan_consistency=REQUEST_PLUS error timed out 
       

      To repro:

      • set 1 node cluster
      • load travel-sample
      • CREATE OR REPLACE FUNCTION func4(doctype) { (SELECT RAW city FROM `travel-sample` WHERE type = doctype) }
      • SELECT t1.city FROM `travel-sample` t1 WHERE t1.type = "landmark" AND t1.city IN func4("airport");

      also the function returns result in timely manner:

      cbq> select func4("airport")
         > ;
      {
          "requestID": "9f0193af-974a-4eee-8fb0-c2b84008a68c",
          "signature": {
              "$1": "json"
          },
          "results": [
          {
              "$1": [
                  "Calais",
                  "Peronne",
                  "Nangis",
                  "Bagnole-de-l'orne",
                  "Albert",
      ...
          "status": "success",
          "metrics": {
              "elapsedTime": "2.368680496s",
              "executionTime": "2.368438498s",
              "resultCount": 1,
              "resultSize": 49069,
              "serviceLoad": 6 

      Attachments

        1. Screenshot 2023-09-26 at 2.05.16 PM.png
          83 kB
          Kamini Jagtiani
        2. Screenshot 2023-09-25 at 7.28.06 PM.png
          87 kB
          Kamini Jagtiani

        Issue Links

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

          Activity

            People

              ajay.bhullar Ajay Bhullar
              pierre.regazzoni Pierre Regazzoni
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty