[
https://issues.apache.org/jira/browse/ARTEMIS-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945010#comment-15945010
]
ASF GitHub Bot commented on ARTEMIS-1056:
-----------------------------------------
Github user gemmellr commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1140#discussion_r108398829
--- Diff:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java
---
@@ -322,17 +308,22 @@ private void dispatch() {
// because we could have a distributed deadlock
// while processing events (for instance onTransport)
// while a client is also trying to write here
- while ((ev = popEvent()) != null) {
- for (EventHandler h : handlers) {
- if (log.isTraceEnabled()) {
- log.trace("Handling " + ev + " towards " + h);
- }
- try {
- Events.dispatch(ev, h);
- } catch (Exception e) {
- log.warn(e.getMessage(), e);
- connection.setCondition(new ErrorCondition());
+
+ synchronized (lock) {
+ while ((ev = collector.peek()) != null) {
+ for (EventHandler h : handlers) {
+ if (log.isTraceEnabled()) {
+ log.trace("Handling " + ev + " towards " + h);
+ }
+ try {
+ Events.dispatch(ev, h);
+ } catch (Exception e) {
+ log.warn(e.getMessage(), e);
+ connection.setCondition(new ErrorCondition());
--- End diff --
Its not clear what the intent is here (and in similar snippet further down
the method), but I'm not sure this will be having the desired effect.
Setting a brand new ErrorCondition like this will effectively clear any
error details for the connection, which are actually the
condition/description/info-map details stored inside an ErrorCondition object,
which will be empty for the new instance. Setting a condition inside the
ErrorCondition doesn't itself lead to it being sent, the endpoint subsequently
needs closed before the details are included in the detach/end/close frame then
being sent. The connection may not be the right endpoint to set an error, e.g
it might be a particular link receiving a delivery event and so that link might
be the endpoint to update.
> Performance improvements over AMQP
> ----------------------------------
>
> Key: ARTEMIS-1056
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1056
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 2.0.0
> Reporter: clebert suconic
> Assignee: clebert suconic
> Fix For: 2.next
>
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)