Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-444

Can't handle out-of-order responses to concurrent GET requests.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.4.0-dp1
    • 2.3.1
    • library
    • Security Level: Public
    • Centos 6.4, 64-bit, Couchbase-Server 2.2

    Description

      We are using libcouchbase in an event-driven mode using libev, sharing the event loop between libcouchbase and our application. IWe instantiate a single library instance and send multiple "single get" requests before the callback from the first request. There is a chance that Couchbase server will send an out-of-order response to one of the GET requests. When that happens, libcouchbase returns an internal error: "Unknown implicit send message op=0" After debugging in the libcouchbase code, we see that the code only handles out-of-order responses for GETQ or GATQ or NOP opcodes. This implies that the application must wait after submitting a single get request to libcouchbase until the callback for that get request is invoked before submitting a second get request.

      We believe that libcouchbase should handle the out-of-order responses. The data is there in the transaction log ring buffer to match the response to the request and issue the callback. If the application issues multiple concurrent GET requests, no immediate error is returned and the internal ring buffers grow to accommodate the outstanding requests. Indeed, if no out-of-order response happens, everything works. Forcing a single request at a time cuts our Couchbase transactions per second in half from around 9K tps to less than 5K tps.

      Attachments

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

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            kkingdon Kevin Kingdon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty