activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michaelandrepearce <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2467: ARTEMIS-2205 Performance improvements o...
Date Tue, 08 Jan 2019 11:20:33 GMT
Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2467#discussion_r245960681
  
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
---
    @@ -730,22 +793,29 @@ public int deliverMessage(MessageReference messageReference, int
deliveryCount,
     
                 if (preSettle) {
                    // Presettled means the client implicitly accepts any delivery we send
it.
    -               sessionSPI.ack(null, brokerConsumer, messageReference.getMessage());
    +               try {
    +                  sessionSPI.ack(null, brokerConsumer, messageReference.getMessage());
    +               } catch (Exception e) {
    +                  log.debug(e.getMessage(), e);
    +               }
                    delivery.settle();
                 } else {
                    sender.advance();
                 }
     
                 connection.flush();
              } finally {
    -            connection.unlock();
    +            synchronized (creditsLock) {
    +               pending.decrementAndGet();
    +            }
    +            if (releaseRequired) {
    +               ((NettyReadable) sendBuffer).getByteBuf().release();
    +            }
              }
    +      } catch (Exception e) {
    +         log.warn(e.getMessage(), e);
     
    -         return size;
    -      } finally {
    -         if (releaseRequired) {
    -            ((NettyReadable) sendBuffer).getByteBuf().release();
    -         }
    +         // important todo: Error treatment
    --- End diff --
    
    Did you look over this? 


---

Mime
View raw message