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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-dp3
    • Component/s: Core
    • Security Level: Public
    • Labels:
      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.

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

        Activity

        Hide
        rags Raghavan Srinivas (Inactive) added a comment -

        This has been fixed and should be available in 1.1 beta

        Show
        rags Raghavan Srinivas (Inactive) added a comment - This has been fixed and should be available in 1.1 beta

          People

          • Assignee:
            rags Raghavan Srinivas (Inactive)
            Reporter:
            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