[
https://issues.apache.org/jira/browse/PROTON-1171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235427#comment-15235427
]
ASF GitHub Bot commented on PROTON-1171:
----------------------------------------
Github user SreeramGarlapati commented on a diff in the pull request:
https://github.com/apache/qpid-proton/pull/73#discussion_r59236240
--- Diff:
proton-j/src/test/java/org/apache/qpid/proton/engine/impl/ssl/SimpleSslTransportWrapperTest.java
---
@@ -117,16 +117,6 @@ public void testInputIncompletePacketInThreeParts()
}
@Test
- public void
testUnderlyingInputUsingSmallBuffer_receivesAllDecodedInput() throws Exception
- {
- _underlyingInput.setInputBufferSize(1);
--- End diff --
I deleted this Test from this File and Moved it to a brand new file for 2
reasons:
1) This function has a bug - SetInputBufferSize - sets only the integer
value. It doesn't change anything with actual Buffer Size.
2) Since, changing buffer size will change the behavior of
SimpleSslTransportWrapper - this could impact other testcases in the same file.
So, moved the Size related test to a separate file...
> proton-j: SimpleSSLTransportWrapper doesn't flush all bytes from the Decode
> buffer to the next transport buffer (_underlyingInput)
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: PROTON-1171
> URL: https://issues.apache.org/jira/browse/PROTON-1171
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-j
> Affects Versions: 0.12.0
> Environment: Any
> Reporter: Sreeram Garlapati
> Priority: Critical
> Fix For: 0.13.0
>
>
> Actual Issue/scenario hit by Microsoft Azure EventHubs:
> We have a pattern where customers sends messages in a burst to our Queue and
> stop sending and then wait for all of them to be received.
> Because of this issue in Proton-j Amqp implementation - we can see many bytes
> were stuck in the SSL Decode Buffer and were only picked up when new
> transport frames arrive.
> Given that this is a 1 line fix - it would be great if you folks can publish
> an incremental minor update to 0.12.X.
> Here are my findings after debugging through this issue:
> - When incoming bytes arrive on the SocketChannel – proton-j client
> gets signaled by nio & as a result it unwinds the transport stack – as a
> result all the TransportInput implementations performs its task on the Read
> Bytes and hands off to the Next Layer in the stack (transport to ssl, ssl to
> frameparser etc).
> - While unwinding that stack, SimpleSSLTransportWrapper.unwrapInput
> reads(16k bytes) from _inputBuffer and the result - decoded bytes are written
> to _decodedInputBuffer – as an intermediate buffer.
> - It then flushes bytes from intermediate buffer to the next layer &
> invokes an _underlyingInput.Process() – to signal it that it has bytes in its
> input buffer.
> - If the underlyingInput (lets say FrameParser) buffer size is small
> – lets say 4k – then decodedInputBuffer will be left with 12k bytes & Over
> time this accrues.
> The fix here is to flush decodedInputBuffer to the Next transport in the
> Network Stack & call _underlyingInput.Process() - until decodedInputBuffer is
> empty. Here’s the pull request:
> https://github.com/apache/qpid-proton/pull/73
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)