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

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

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


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java:
##########
@@ -50,14 +47,24 @@ public class PagedReferenceImpl extends 
LinkedListImpl.Node<PagedReferenceImpl>
 
    private int messageEstimate = -1;
 
+   PagePosition position;
+
+   @Override
+   public PagePosition getPosition() {
+      if (position == null) {
+         position = getPagedMessage().newPositionObject();
+      }
+      return position;
+   }

Review Comment:
   Instead of making getPosition() synchronized, I will just make positon 
volatile here.
   
   This is used on browsing. And this is just caching the value.





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

    Worklog Id:     (was: 779089)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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.23.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




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

Reply via email to