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

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

                Author: ASF GitHub Bot
            Created on: 14/Jun/22 14:18
            Start Date: 14/Jun/22 14:18
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #4101:
URL: https://github.com/apache/activemq-artemis/pull/4101#discussion_r896886166


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java:
##########
@@ -626,6 +656,41 @@ public Page createPage(final int pageNumber) throws 
Exception {
       return page;
    }
 
+   @Override
+   public final Page usePage(final long pageId) {
+      return usePage(pageId, true);
+   }
+
+   @Override
+   public Page usePage(final long pageId, final boolean create) {
+      synchronized (usedPages) {
+         try {
+            Page page = usedPages.get(pageId);
+            if (create && page == null) {
+               page = newPageObject(pageId);
+               if (page.getFile().exists()) {
+                  page.getMessages();
+                  injectPage(page);
+               }

Review Comment:
   It just seems very weird to me that a Page returned from 'usePage()' can be 
considered not part of 'usedPages', when 'usePage()' is the main thing adding 
pages to the usedPages collection.





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

    Worklog Id:     (was: 781238)
    Time Spent: 9h 40m  (was: 9.5h)

> Add Option to read messages into paging based on sizing and eliminate caching
> -----------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3850
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3850
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>    Affects Versions: 2.22.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.24.0
>
>          Time Spent: 9h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to