Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2402

byte count of FrameBuffer in AWAITING_CLOSE state is not subtracted from readBufferBytesAllocated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.1
    • 0.9.2
    • Java - Library
    • None

    Description

      FrameBuffer.close() doesn't subtract the count for that in AWAITING_CLOSE state.

      public void close() {
      // if we're being closed due to an error, we might have allocated a
      // buffer that we need to subtract for our memory accounting.
      if (state_ == FrameBufferState.READING_FRAME || state_ == FrameBufferState.READ_FRAME_COMPLETE)

      { readBufferBytesAllocated.addAndGet(-buffer_.array().length); }

      trans_.close();
      if (eventHandler_ != null)

      { eventHandler_.deleteContext(context_, inProt_, outProt_); }

      }

      Attachments

        Activity

          People

            jfarrell Jake Farrell
            anmin anm
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: