Details

      Description

      Customer evaluated Couchbase vs Redis
      When they try to set and to observe to replica by
      client.set(key, value, PersistTo.ZERO, ReplicateTo.ONE).get().
      They got poor resultes of 10 ops
      Regarding to Perry advise to split the set comand to set and observe
      OperationFuture<Boolean> op = client.set(g.getCode(), mapper.writeValueAsString(g));
      settimer.stop();
      timer = validateMetric.time();
      client.observePoll(g.getCode(), op.getCas(), PersistTo.ZERO, ReplicateTo.ONE, false);
      timer.stop();

      they stil got poor results of 600ms per operation when the while the pollInterval set to 100
      With setting the obsPollInterval to 3 the results went down to 520 ms.

      To evaluate the minimum times to verfy the set by this code :
      boolean found = false;
      int observeCounter = 0;
      do {
      Map<?, ObserveResponse> resp = client.observe(g.getCode(), op.getCas());
      int i = 0;
      for (ObserveResponse r : resp.values()) {
      if (r == ObserveResponse.FOUND_NOT_PERSISTED || r == ObserveResponse.FOUND_PERSISTED)

      { i++; }

      }
      if (i > 1)

      { found = true; }

      else

      { Thread.sleep(1); }

      observeCounter++;
      } while
      It takes 200 observe calls in average to validate the replication. Without sleep(1) it takes 800 calls.

      To evaluate the avarge time that it takes to observe by :
      OperationFuture<Boolean> op = client.set(g.getCode(), mapper.writeValueAsString(g));
      Thread.sleep(<<1ms-500ms>>);
      Map<?, ObserveResponse> resp = client.observe(g.getCode(), op.getCas());
      for (ObserveResponse r : resp.values()) {
      if (r == ObserveResponse.FOUND_NOT_PERSISTED || r == ObserveResponse.FOUND_PERSISTED)

      { i++; }

      }
      if (i > 1)

      { found = true; }

      Each single set() test gives different results. Thread.sleep(500) is sometimes enough, but sometimes it’s not. 1000ms is mostly enough.

        Issue Links

        # Subject Project Status CR V
        For Gerrit Dashboard: &For+MB-8453=message:MB-8453

          Activity

          Hide
          chiyoung Chiyoung Seo added a comment -

          Points: 3

          Show
          chiyoung Chiyoung Seo added a comment - Points: 3
          Hide
          chiyoung Chiyoung Seo added a comment -

          I discussed this issue with Abhinav. He will start to work on this issue soon.

          Show
          chiyoung Chiyoung Seo added a comment - I discussed this issue with Abhinav. He will start to work on this issue soon.
          Show
          abhinav Abhinav Dangeti added a comment - wip: http://review.couchbase.org/#/c/27972/
          Hide
          chiyoung Chiyoung Seo added a comment -
          Show
          chiyoung Chiyoung Seo added a comment - The fix was merged: http://review.couchbase.org/#/c/27972/

            People

            • Assignee:
              abhinav Abhinav Dangeti
              Reporter:
              ilan Ilan Katz (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes