[
https://issues.apache.org/jira/browse/ARTEMIS-3761?focusedWorklogId=754021&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-754021
]
ASF GitHub Bot logged work on ARTEMIS-3761:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Apr/22 12:37
Start Date: 07/Apr/22 12:37
Worklog Time Spent: 10m
Work Description: 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
Issue Time Tracking
-------------------
Worklog Id: (was: 754021)
Time Spent: 0.5h (was: 20m)
> Cleanup paged messages in the middle of the stream
> --------------------------------------------------
>
> Key: ARTEMIS-3761
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3761
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 2.21.0
> Reporter: Clebert Suconic
> Priority: Major
> Fix For: 2.22.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Paging only removes files at the beginning of the stream...
> Say you have paged files 1 through 1000...
> if all the messages are ack, but one message on file 1 is missing an ack, all
> the 999 subsequent files would not be removed until all the messages on file
> 1 is ack.
> This was working as engineered, but sometimes devs don't have complete
> control on their app.
> With this improvement we will now remove messages in the middle of the stream
> as well.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)