[ https://issues.apache.org/jira/browse/ARTEMIS-4651?focusedWorklogId=906473&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906473 ]
ASF GitHub Bot logged work on ARTEMIS-4651: ------------------------------------------- Author: ASF GitHub Bot Created on: 22/Feb/24 14:57 Start Date: 22/Feb/24 14:57 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4827: URL: https://github.com/apache/activemq-artemis/pull/4827#discussion_r1499382695 ########## artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java: ########## @@ -0,0 +1,513 @@ +/* + * 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.protocol.amqp.connect.mirror; + +import java.lang.invoke.MethodHandles; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.function.LongSupplier; + +import io.netty.util.collection.LongObjectHashMap; +import org.apache.activemq.artemis.api.core.Message; +import org.apache.activemq.artemis.api.core.QueueConfiguration; +import org.apache.activemq.artemis.api.core.SimpleString; +import org.apache.activemq.artemis.core.io.IOCriticalErrorListener; +import org.apache.activemq.artemis.core.journal.Journal; +import org.apache.activemq.artemis.core.journal.RecordInfo; +import org.apache.activemq.artemis.core.journal.collections.JournalHashMap; +import org.apache.activemq.artemis.core.journal.collections.JournalHashMapProvider; +import org.apache.activemq.artemis.core.paging.PagingStore; +import org.apache.activemq.artemis.core.paging.cursor.PageSubscription; +import org.apache.activemq.artemis.core.paging.cursor.PagedReference; +import org.apache.activemq.artemis.core.paging.impl.Page; +import org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordIds; +import org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl; +import org.apache.activemq.artemis.core.persistence.impl.journal.codec.AckRetry; +import org.apache.activemq.artemis.core.server.ActiveMQComponent; +import org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent; +import org.apache.activemq.artemis.core.server.ActiveMQServer; +import org.apache.activemq.artemis.core.server.MessageReference; +import org.apache.activemq.artemis.core.server.Queue; +import org.apache.activemq.artemis.core.server.RoutingContext; +import org.apache.activemq.artemis.core.server.impl.AckReason; +import org.apache.activemq.artemis.core.server.impl.AddressInfo; +import org.apache.activemq.artemis.core.server.mirror.MirrorController; +import org.apache.activemq.artemis.core.transaction.Transaction; +import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AckManager implements ActiveMQComponent { + + // we first retry on the queue a few tiems + public static final short MAX_QUEUE_ATTEMPT = Short.parseShort(System.getProperty(AckRetry.class.getName() + ".MAX_QUEUE_ATTEMPT", "5")); Review Comment: I will rename it back to MIN_QUEUE_ATTEMPTS (will include the S) Issue Time Tracking ------------------- Worklog Id: (was: 906473) Time Spent: 3h 10m (was: 3h) > Performance improvements on Mirror and Paging > --------------------------------------------- > > Key: ARTEMIS-4651 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4651 > Project: ActiveMQ Artemis > Issue Type: Improvement > Reporter: Clebert Suconic > Assignee: Clebert Suconic > Priority: Major > Fix For: 2.33.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Before this change, sends were not paged at the SNF. They are now copied. > I also added a different scheme for retrying messages in a batches. A > collection with pending IDs is created and a few retries are performed at > different levels. -- This message was sent by Atlassian Jira (v8.20.10#820010)