osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] activemq-artemis pull request #2467: ARTEMIS-2205 Performance improvements o...


Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2467#discussion_r242788013
  
    --- 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);
    --- End diff --
    
    Static logger method needed


---