[
https://issues.apache.org/jira/browse/QPID-7793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021223#comment-16021223
]
Lorenz Quack edited comment on QPID-7793 at 5/23/17 2:14 PM:
-------------------------------------------------------------
Review comments:
* In {{FrameHandler#parse}} the framing error on line 165 gets handled to late
(after all pending frames have been processed including any Begin, Attach,
Transfer, ...). A break after the detection of the error condition after line
168 seems sufficient. However, this would change the previous behaviour in that
the frame causing the error would not be processed any more. The previous
behaviour seems odd to me but I cannot point to a point in the spec that would
say it is wrong.
* -In {{FrameHandler#parse}} why did you move the detection of the channel-max
violation into the {{AMQPConnection_1_0Impl#received(int, Object)}}? Seems to
violate the fail early principal and I can't see the benefit.- Keith pointed
out to me, that this is was done to accommodate the case where the Open and
Begin are sent pipelined. Then (and after this commit) the Begin frame is
decoded before the Open is being processed so that the channel-max is not known
during decoding of the Begin frame. Therefore, the check is defered to
processing time.
was (Author: lorenz.quack):
Review comments:
* In {{FrameHandler#parse}} the framing error on line 165 gets handled to late
(after all pending frames have been processed including any Begin, Attach,
Transfer, ...). A break after the detection of the error condition after line
168 seems sufficient. However, this would change the previous behaviour in that
the frame causing the error would not be processed any more. The previous
behaviour seems odd to me but I cannot point to a point in the spec that would
say it is wrong.
* In {{FrameHandler#parse}} why did you move the detection of the channel-max
violation into the {{AMQPConnection_1_0Impl#received(int, Object)}}? Seems to
violate the fail early principal and I can't see the benefit.
> [1.0] Avoid repetitious AccessController.doPrivileged calls if incoming
> buffer contains a sequence of frames for the same channel
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-7793
> URL: https://issues.apache.org/jira/browse/QPID-7793
> Project: Qpid
> Issue Type: Improvement
> Components: Java Broker
> Reporter: Keith Wall
> Assignee: Keith Wall
> Fix For: qpid-java-broker-7.0.0
>
>
> If the incoming buffer contains an a sequence of frames for the same channel,
> we currently call AccessController.doPrivileged for each frame individually.
> As AccessController.doPrivileged is a relatively expensive operation, it is
> worthwhile to make this algorithm more efficient.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]