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

asyncGetAndLock returns the same value when a lock is refused and when a key is not found

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 1.0.3
    • 1.0.2
    • Core
    • Security Level: Public

    Description

      This report is re: asyncGetAndLock method in the java client.

      From the current implementation of asyncGetAndLock , it is impossible to tell the difference between

      • a value that doesn't exist(& should be added) and
      • a value that exists, but is locked by another client.

      In both cases, you get this:
      CASValue<T>(-1, null);

      which customer opines is pretty non-useful in the cases where you want to decide whether to try again or move on to an add.

      Suggestion from the customer is:

      Add the CasGetStatus class which has additional information about the failure type (attached), and modify CouchbaseClient.java to create and return that class (diff attached).

      Attached files:
      1) CASGetStatus.java
      2) couchbasediff.txt

      Attachments

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

        Activity

          People

            mikew Mike Wiederhold [X] (Inactive)
            hari Hari Subramaniam (Inactive)
            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