Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-932

BodyLength is zero when receive buffer tries read from it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 2.1.3
    • 2.1.2
    • library
    • None

    Description

      In certain situations, the first receive call will only get part of the memcached header (less than 24 bytes). When the SDK tries to pull the bodylength from the header, it gets a value of zero, since the header is incomplete.

      This is a partial fix for the issue (but doesn't address why):

      var bufferSize = state.BodyLength < Configuration.BufferSize 
                                  ? state.BodyLength
                                  : Configuration.BufferSize;
      //this is the fixed code
      var bufferSize = state.BodyLength < Configuration.BufferSize && state.BytesReceived > 8
                                  ? state.BodyLength
                                  : Configuration.BufferSize;
      

      Attachments

        For Gerrit Dashboard: NCBC-932
        # Subject Branch Project Status CR V

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            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