anm created THRIFT-2402:
---------------------------
Summary: byte count of FrameBuffer in AWAITING_CLOSE state is not
subtracted from readBufferBytesAllocated
Key: THRIFT-2402
URL: https://issues.apache.org/jira/browse/THRIFT-2402
Project: Thrift
Issue Type: Bug
Components: Java - Library
Affects Versions: 0.9.1
Reporter: anm
Fix For: 0.9.2
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_);
}
}
--
This message was sent by Atlassian JIRA
(v6.2#6252)