activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From franz1981 <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #2484: ARTEMIS-2216 Use a specific executor fo...
Date Fri, 04 Jan 2019 07:19:12 GMT
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2484#discussion_r245224854
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
---
    @@ -278,21 +293,26 @@ public boolean isPaging() {
           lock.readLock().lock();
     
           try {
    -         if (addressFullMessagePolicy == AddressFullMessagePolicy.BLOCK) {
    -            return false;
    -         }
    -         if (addressFullMessagePolicy == AddressFullMessagePolicy.FAIL) {
    -            return isFull();
    -         }
    -         if (addressFullMessagePolicy == AddressFullMessagePolicy.DROP) {
    -            return isFull();
    -         }
    -         return paging;
    +         return isPagingDirtyRead();
           } finally {
              lock.readLock().unlock();
           }
        }
     
    +   @Override
    +   public boolean isPagingDirtyRead() {
    +      if (addressFullMessagePolicy == AddressFullMessagePolicy.BLOCK) {
    --- End diff --
    
    Yes, but we can just volatile load once before checking its value 3 times, on each call
of  isPagingDirtyRead


---

Mime
View raw message