git.net

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

[GitHub] activemq-artemis pull request #2482: ARTEMIS-2214 Cache durable&priority in ...


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

    https://github.com/apache/activemq-artemis/pull/2482#discussion_r244150155
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java ---
    @@ -363,4 +371,20 @@ public long getPersistentSize() {
           return messageSize;
        }
     
    +   @Override
    +   public byte getPriority() {
    +      if (priority == -1) {
    +         priority = getMessage().getPriority();
    +      }
    +      return priority;
    +   }
    +
    +   @Override
    +   public boolean isDurable() {
    +      if (messageID < 0) {
    --- End diff --
    
    should use durable field or additional flag to see if its been cached, messageID maybe cached already but not durable.


---