[ 
https://issues.apache.org/jira/browse/ARTEMIS-3178?focusedWorklogId=842344&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-842344
 ]

ASF GitHub Bot logged work on ARTEMIS-3178:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Jan/23 17:24
            Start Date: 30/Jan/23 17:24
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4349:
URL: https://github.com/apache/activemq-artemis/pull/4349#discussion_r1090927064


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java:
##########
@@ -179,11 +182,13 @@ public void close(PageSubscription cursor) {
    }
 
    @Override
-   public void scheduleCleanup() {
+   public Future<Boolean> scheduleCleanup() {
+      final SimpleFutureImpl<Boolean> future = new SimpleFutureImpl<>();
       if (!cleanupEnabled || scheduledCleanup.intValue() > 2) {
          // Scheduled cleanup was already scheduled before.. never mind!
          // or we have cleanup disabled
-         return;
+         pagingStore.execute(() -> future.set(true));

Review Comment:
   Yes... I wanted to make sure any previous call to cleanup was finished. Say 
you called scheduleCleanup a couple of times.. then you call scheduleCleanup 
again...
   
   
    I don't need to schedule another one as I already have a call scheduled, 
but I want to return a Future that will be released after these calls have 
finished.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 842344)
    Time Spent: 40m  (was: 0.5h)

> Provide a way to limit the size of an address after paged
> ---------------------------------------------------------
>
>                 Key: ARTEMIS-3178
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3178
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker, Configuration
>    Affects Versions: 2.17.0
>            Reporter: Gary Tully
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.28.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> I am adding three attributes to Address-settings:
>  * page-limit-bytes: Number of bytes. We will convert this metric into max 
> number of pages internally by dividing max-bytes / page-size. It will allow a 
> max based on an estimate.
>  * page-limit-messages: Number of messages
>  * page-full-message-policy: fail : drop
> We will now allow paging, until these max values and then fail or drop 
> messages.
> Once these values are retracted, the address will remain full until a period 
> where cleanup is kicked in by paging. So these values may have a certain 
> delay on being applied, but they should always be cleared once cleanup 
> happened.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to