Uploaded image for project: 'Couchbase Ruby client library'
  1. Couchbase Ruby client library
  2. RCBC-492

Requests are being passed instead of sending SDK_INVALID_ARGUMENT_EXCEPTION

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • None
    • None
    • 1
    • SDK22

    Description

      Below is the list of requests that are being forwarded by SDKs to server (ideally, should not), with their respective Java error messages (They will be quite helpful while debugging):

      1. VectorSearchBase64Test.vectorQueryWithoutFieldNameThrowInvalidArgument

      elapsedNanos: 15115583
      initiated {
        seconds: 1717689892
        nanos: 974000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: Field cannot be null or empty"
          }
        }
      }
       

      2. VectorSearchTest.emptySearchRequestThrowInvalidArgument

      elapsedNanos: 48000
      initiated {
        seconds: 1717691088
        nanos: 865000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: At least one of searchQuery and vectorSearch must be specified"
          }
        }
      }
      

      3. VectorSearchTest.emptyVectorQueryThrowInvalidArgument

      elapsedNanos: 1260833
      initiated {
        seconds: 1717690454
        nanos: 328000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: Vector must have at least one element."
          }
        }
      }
      

      While we are getting error:

      14:40:48.476 [executor-3] INFO  hbase.client.util.StreamRunner - Performer reports exception, ending stream: couchbase {
        name: "Couchbase::Error::InternalServerFailure"
        type: SDK_INTERNAL_SERVER_FAILURE_EXCEPTION
        serialized: "unable to perform search query for index \"global_vector_index_441523\": rest_index: Query, indexName: global_vector_index_441523, err: bleve: QueryBleve parsing searchRequest, err: k must be greater than 0 and vector must be non-empty: internal_server_failure (5), context={\"error\":\"5, internal_server_failure (5)\",\"client_context_id\":\"7d351e-1d91-d746-62d6-cb2603e2646791\",\"index_name\":\"global_vector_index_441523\",\"query\":\"{\\\"match_none\\\":null}\",\"parameters\":\"{\\\"ctl\\\":{\\\"timeout\\\":75000},\\\"explain\\\":false,\\\"knn\\\":[{\\\"field\\\":\\\"\\\",\\\"k\\\":3,\\\"vector\\\":[]}],\\\"query\\\":{\\\"match_none\\\":null},\\\"showrequest\\\":false}\",\"http_status\":400,\"http_body\":\"{\\\"error\\\":\\\"rest_index: Query, indexName: global_vector_index_441523, err: bleve: QueryBleve parsing searchRequest, err: k must be greater than 0 and vector must be non-empty\\\",\\\"request\\\":{\\\"ctl\\\":{\\\"timeout\\\":75000},\\\"explain\\\":false,\\\"knn\\\":[{\\\"field\\\":\\\"\\\",\\\"k\\\":3,\\\"vector\\\":[]}],\\\"query\\\":{\\\"match_none\\\":null},\\\"showrequest\\\":false},\\\"status\\\":\\\"fail\\\"}\\n\",\"last_dispatched_to\":\"192.168.0.4:63574\",\"last_dispatched_from\":\"192.168.0.2:60012\"}"
      }
      

      4. VectorSearchTest.vectorQueryWithoutFieldNameThrowInvalidArgument

      elapsedNanos: 653000
      initiated {
        seconds: 1717690548
        nanos: 198000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: Field cannot be null or empty"
          }
        }
      }
      

      5. VectorSearchTest.vectorFiledNameWithoutVectorElementThrowInvalidArgument

      elapsedNanos: 64542
      initiated {
        seconds: 1717690752
        nanos: 114000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: Vector must have at least one element."
          }
        }
      }
      

      6. VectorSearchTest.emptyVectorSearchThrowInvalidArgument

      elapsedNanos: 68208
      initiated {
        seconds: 1717693038
        nanos: 94000000
      }
      sdk {
        exception {
          couchbase {
            name: "InvalidArgumentException"
            type: SDK_INVALID_ARGUMENT_EXCEPTION
            serialized: "com.couchbase.client.core.error.InvalidArgumentException: At least one VectorQuery must be specified"
          }
        }
      }
      

      FIT patch that has these tests: https://review.couchbase.org/c/transactions-fit-performer/+/210629

      Thanks!

      Attachments

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

        Activity

          People

            Dimitris.Christodoulou Dimitris Christodoulou
            aaliya.haque Aaliya Haque
            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