Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1534

GetTest.getWithProjection() failing due to SDK_PATH_NOT_FOUND_EXCEPTION

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.7.0
    • None
    • None
    • None
    • 7.0, 7.1, 7.2, 7.6

    Description

      Total failure: 1*4 = 4

      Test:

      @TestFactory
      Stream<DynamicTest> getWithProjection() {
          return iterate(p -> {
              String id = UUID.randomUUID().toString();
              executeAndAssertHasCas(shared, command(KvCommandUtil.upsert(collection, id, FOO_CONTENT), p.api));
       
              var getResult = executeAndAssertHasCas(shared, command(KvCommandUtil.get(
                      collection,
                      id,
                      com.couchbase.client.protocol.sdk.kv.GetOptions.newBuilder()
                              .addAllProjection(Arrays.asList("foo", "created", "notfound"))
                              .build()
              ), p.api));
              assertNoExpiry(getResult);
       
              JsonObject decoded = JsonObject.fromJson(getResult.getGetResult().getContent().getContentAsBytes().toByteArray());
              assertEquals("bar", decoded.getString("foo"), getResult::toString);
              assertEquals(true, decoded.getBoolean("created"), getResult::toString);
              assertFalse(decoded.containsKey("age"), getResult::toString);
          });
      } 

      Here, the value of "getResult" is:

      exception {
        couchbase {
          type: SDK_PATH_NOT_FOUND_EXCEPTION
          serialized: "sub-document error at index 2: path not found | {\"status_code\":204,\"document_key\":\"106d250e-2e53-4554-b3ec-69b10ac30b89\",\"bucket\":\"default\",\"scope\":\"_default\",\"collection\":\"_default\",\"error_name\":\"SUBDOC_MULTI_PATH_FAILURE\",\"error_description\":\"Subdoc: Some (or all) commands failed. Inspect payload for details\",\"opaque\":10,\"last_dispatched_to\":\"172.23.111.130:11210\",\"last_dispatched_from\":\"172.17.0.2:42822\",\"last_connection_id\":\"ccfda9d11fbf8428/d2bb5578022e4012\"}"
        }
      } 

      While the expected value is something similar to:

      get_result {
        cas: 1699093443880943616
        content {
          content_as_bytes: "{\"created\":true,\"foo\":\"bar\"}"
        }
      } 

      And this is resulting in error message:

      Cannot convert byte array to JsonObject 

      Jenkins failure:
      https://sdk.jenkins.couchbase.com/job/golang/job/transactions/job/TransactionsFITPerformer_SinglePerformer/1070/testReport/com.couchbase.client.kv/GetTest/Setup_test_Infra_and_Execute_Tests___7_0_release_Vs_GO_MASTER___getWithProjection/
      https://sdk.jenkins.couchbase.com/job/golang/job/transactions/job/TransactionsFITPerformer_SinglePerformer/1070/testReport/com.couchbase.client.kv/GetTest/Setup_test_Infra_and_Execute_Tests___7_1_stable_Vs_GO_MASTER___getWithProjection/

      Attaching driver and performer logs for your reference. 

      Thanks!

      Attachments

        Issue Links

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

          Activity

            People

              charles.dixon Charles Dixon
              aaliya.haque Aaliya Haque
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty