Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-471

(misunderstanding) XDCR REST API "max-concurrency" only works for 1 of 3 documented end-points.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.x
    • 4.0
    • rest, xdcr
    • Couchbase Server 2.5.1
      RHEL 6.4
      VM (VirtualBox0
      1 node "cluster"
    • DOC-S16-May18

    Description

      This defect relates to the following REST APIs:

      The documentation suggests these all do the same thing, but with the scope of change being different.

      <docs>
      /settings/replications/ — global settings applied to all replications for a cluster
      settings/replications/<replication_id> — settings for specific replication for a bucket
      /internalSettings - settings applied to all replications for a cluster. Endpoint exists in Couchbase 2.0 and onward.
      </docs>

      This defect is because only "settings/replications/<replication_id>" has any effect. The other REST endpoints have no effect.

      Out of these APIs I can confirm that changing "/settings/replications/<replication_id>" has an effect. The XDCR code shows that the concurrent reps setting feeds into the concurreny throttle as the number of available tokens. I use xdcr log files where we print the concurrency throttle token data to observe that the setting has an effect.

      For example, a cluster in the default configuration has a total tokens of 32. We can grep to see this.

      [root@localhost logs]# grep "is done normally, total tokens:" xdcr.*
      2014-09-15T13:09:03.886,ns_1@127.0.0.1:<0.32370.0>:concurrency_throttle:clean_concurr_throttle_state:275]rep <0.33.1> to node "192.168.69.102:8092" is done normally, total tokens: 32, available tokens: 32,(active reps: 0, waiting reps: 0)

      Now changing the setting to 42 the log file shows the change take affect.

      curl -u Administrator:password http://localhost:8091/settings/replications/01d38792865ba2d624edb4b2ad2bf07f%2fdefault%2fdefault -d maxConcurrentReps=42

      [root@localhost logs]# grep "is done normally, total tokens:" xdcr.*
      dcr.1:[xdcr:debug,2014-09-15T13:17:41.112,ns_1@127.0.0.1:<0.32370.0>:concurrency_throttle:clean_concurr_throttle_state:275]rep <0.2321.1> to node "192.168.69.102:8092" is done normally, total tokens: 42, available tokens: 42,(active reps: 0, waiting reps: 0)

      Since this defect is that both of the other two REST end-points don't appear to have any affect here's an example changing "settings/replication". This example was on a clean cluster, i.e. no other settings have been changed. Only creating bucket and replication + client writes has been performed.

      root@localhost logs]# curl -u Administrator:password http://localhost:8091/settings/replications/ -d maxConcurrentReps=48
      {"maxConcurrentReps":48,"checkpointInterval":1800,"docBatchSizeKb":2048,"failureRestartInterval":30,"workerBatchSize":500,"connectionTimeout":180,"workerProcesses":4,"httpConnections":20,"retriesPerRequest":2,"optimisticReplicationThreshold":256,"socketOptions":

      {"keepalive":true,"nodelay":false}

      ,"supervisorMaxR":25,"supervisorMaxT":5,"traceDumpInvprob":1000}

      Above shows that the JSON has acknowledged the value of 48 but the log files show no change. After much waiting and re-checking grep shows no evidence.

      [root@localhost logs]# grep "is done normally, total tokens:" xdcr.* | grep "total tokens: 48" | wc -l
      0
      [root@localhost logs]# grep "is done normally, total tokens:" xdcr.* | grep "total tokens: 32" | wc -l
      7713

      The same was observed for /internalSettings/

      Found on both 2.5.1 and 3.0.

      Attachments

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

        Activity

          People

            richard.smedley Richard Smedley
            jwalker Jim Walker
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty