You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2022/04/07 12:37:14 UTC

[GitHub] [activemq-artemis] clebertsuconic commented on a diff in pull request #4015: ARTEMIS-3761 Improve page cleanup to remove messages in the middle of the stream

clebertsuconic commented on code in PR #4015:
URL: https://github.com/apache/activemq-artemis/pull/4015#discussion_r845082777


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java:
##########
@@ -667,13 +724,14 @@ public Page depage() throws Exception {
             return null;
          } else {
             numberOfPages--;
-
+            assert numberOfPages >= 0 : "numberOfPages should never be negative. on depage(). currentPageId=" + currentPageId + ", firstPageId=" + firstPageId + "";

Review Comment:
   my own review here...
   since I'm returning the counter in case the file did not exist... this could be eventually negative, but it would compensate on the ++ for !exists later on..
   
   
   I need to move this assertion for after that check



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org