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

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

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


##########
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:
   usedPages is a cache of pages being used by cursors or the current written 
page. so, on that case the injectPage is to the page being written.
   
   reusedPage on usedPage to me would sound the same.





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

    Worklog Id:     (was: 781170)
    Time Spent: 8h 10m  (was: 8h)

> 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: 8h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to