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

Cannot discern difference between modified and timed out on synchronous operations - OperationStatus on observed operations does not record the status of the observe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.1-dp3
    • None
    • Core
    • Security Level: Public
    • None

    Description

      From the synchronous set method, the underlying observePoll() is called but the results of the OperationFuture are set with the result of the status of the mutation, not the result of the status of the observe.

      public OperationFuture<Boolean> set(String key, int exp,
      String value, PersistTo req, ReplicateTo rep) {
      OperationFuture<Boolean> setOp = set(key, exp, value);
      try {
      if (setOp.get())

      { observePoll(key, setOp.getCas(), req, rep); }

      } catch (InterruptedException e)

      { setOp.set(false, setOp.getStatus()); } catch (ExecutionException e) { setOp.set(false, setOp.getStatus()); }

      catch (TimeoutException e)

      { setOp.set(false, setOp.getStatus()); } catch (IllegalArgumentException e) { setOp.set(false, setOp.getStatus()); }

      catch (RuntimeException e)

      { setOp.set(false, setOp.getStatus()); }

      return (setOp);
      }

      Note that the setOp response is used when setting it's own status, not the status of the observe, which is buried in the exception. The exception is out of scope by the time the response goes back to the caller's code.

      Attachments

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

        Activity

          People

            rags Raghavan Srinivas (Inactive)
            ingenthr Matt Ingenthron
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty