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 #2369: ARTEMIS-2123 Paging not stopped if ther...
Date Tue, 16 Oct 2018 07:08:57 GMT
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2369#discussion_r225419711
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
---
    @@ -599,6 +600,18 @@ private long checkMinPage(Collection<PageSubscription> cursorList)
{
     
        }
     
    +   private void deliverIfNecessary(Collection<PageSubscription> cursorList, long
minPage) {
    +      for (PageSubscription cursor : cursorList) {
    +         long firstPage = cursor.getFirstPage();
    +         if (firstPage == minPage) {
    +            if (cursor.getQueue().getMessageCount() == 0 && cursorList.size()
> 1) {
    +               cursor.getQueue().deliverAsync();
    +               break;
    --- End diff --
    
    The `break` could be taken out, landing into `if (firstPage == minPage) { ..break; }`?
    @wy96f @clebertsuconic how many cursors can have `cursor.getFirstPage() == minPage`?


---

Mime
View raw message