Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1204

DocumentFragment mistakenly returns exists("NON_EXISTENT_PATH") == true

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • None
    • None
    • None
    • None

    Description

      This code

              Bucket bucket; // = ...
              JsonDocument docA = JsonDocument.create("docA", JsonObject.create().put("val", 1));
              bucket.insert(docA);
       
              bucket.async()
                      .lookupIn("docA")
                      .exists("mx")
                      .execute()
                      .toBlocking()
                      .subscribe(
                              lookupDocumentFragment -> {
                                  boolean exists = lookupDocumentFragment.exists("mx");
                                  // exists is true, and should be false
                              },
                              e -> e.printStackTrace()
                      );
      

      will lead to the DocumentFragment claiming that the nonexistent path does in fact exist.

      The problem was reported in the forums here https://forums.couchbase.com/t/java-sdk-bucket-lookupin-exists-bug/16759.

      Attachments

        Issue Links

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

          Activity

            People

              graham.pople Graham Pople
              graham.pople Graham Pople
              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