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

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

                Author: ASF GitHub Bot
            Created on: 21/Oct/22 04:38
            Start Date: 21/Oct/22 04:38
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4265:
URL: https://github.com/apache/activemq-artemis/pull/4265#discussion_r1001354901


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/NonPersistentPagingCounterImpl.java:
##########
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.paging.cursor.impl;
+
+import java.lang.invoke.MethodHandles;
+import java.util.LinkedList;
+
+import org.apache.activemq.artemis.core.paging.cursor.PageSubscriptionCounter;
+import org.apache.activemq.artemis.core.paging.impl.Page;
+import org.apache.activemq.artemis.core.transaction.Transaction;
+import org.apache.activemq.artemis.core.transaction.TransactionOperation;
+import 
org.apache.activemq.artemis.core.transaction.TransactionOperationAbstract;
+import org.apache.activemq.artemis.core.transaction.TransactionPropertyIndexes;
+import org.apache.activemq.artemis.utils.SizeAwareMetric;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This class will encapsulate the persistent counters for the 
PagingSubscription, however without using the journal.
+ * Upon restart the system will always rebuild the counters.
+ */
+public class NonPersistentPagingCounterImpl implements PageSubscriptionCounter 
{

Review Comment:
   just a FYI for anyone reviewing, the other implementation of 
PageSubscriptionCounter will be removed..
   
   
   And this one will probably be renamed. 
   
   





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

    Worklog Id:     (was: 819000)
    Time Spent: 0.5h  (was: 20m)

> Replace PageCounter Journal Records by a real counter from paging
> -----------------------------------------------------------------
>
>                 Key: ARTEMIS-4065
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4065
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Clebert Suconic
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Instead of storing records on journal for counting how many records there are 
> in paging, the system should instead just swipe the paging system in parallel 
> with processing data.
> The changes I'm making will take a snapshot of the current records of paging, 
> and then it will read all the pages to rebuild the counters.
> On tests I am making from a real data server, a system that had a lot of 
> pages (700) needed less than 1 minute to rebuild the counters, and the 
> messages were available to be delivered while the swipe was being done.



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

Reply via email to