Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-28551

DCP flow-control acking too much for DCP deletion

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.0.0, 5.1.0, 5.5.0
    • couchbase-bucket
    • None
    • Untriaged
    • Unknown

    Description

      This issue likely covers all the times we see (on a replication stream)

      2018-03-05T11:44:04.982688Z INFO (default) DCP (Producer) eq_dcpq:replication:ns_1@172.23.108.103->ns_1@172.23.97.237:default - Attempting to release 193394 bytes which is greater than bytesOutstanding:193355
      

      When the DcpConsumer (consumer.cc) receives a delete, it calculates how many bytes to ack. At the end of the function is:

      const auto bytes = MutationResponse::mutationBaseMsgBytes + key.size() +
                             meta.size() + value.size();
      flowControl.incrFreedBytes(uint32_t(bytes));
      notifyConsumerIfNecessary(true/*schedule*/);
      

      So a delete sends uses the mutationBaseMsgBytes which is much bigger than an actual delete, so we will ack 13 bytes too much for each delete received.

         static const uint32_t mutationBaseMsgBytes = 55;
         static const uint32_t deletionBaseMsgBytes = 42;
      

      Attachments

        Issue Links

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

          Activity

            People

              ritam.sharma Ritam Sharma
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty