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

DCP Consumer (Processor task) may not yield whilst busy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.1.2, 4.5.1
    • 3.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.1.2, 4.5.0
    • couchbase-bucket
    • Security Level: Public
    • None
    • Untriaged
    • No

    Description

      If a DCP consumer is hit with more data than it can consume it will run the Processor task for as long as this continues, this results in NONIO threads being held preventing other NONIO tasks from running.

      The problem is the following while loop which can keep calling back into the stream object.
      http://src.couchbase.org/source/xref/3.1.3/ep-engine/src/dcp-consumer.cc#583

      583        do {
      584            if (!engine_.getTapThrottle().shouldProcess()) {
      585                backoffs++;
      586                return cannot_process;
      587            }
      588
      589            bytes_processed = 0;
      590            process_ret = stream->processBufferedMessages(bytes_processed);
      591            flowControl.freedBytes.fetch_add(bytes_processed);
      592        } while (bytes_processed > 0 && process_ret != cannot_process);
      593    }
      

      Attachments

        Issue Links

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

          Activity

            People

              jwalker Jim Walker
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  PagerDuty