[ https://issues.apache.org/jira/browse/ARTEMIS-4206?focusedWorklogId=854188&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-854188 ]
ASF GitHub Bot logged work on ARTEMIS-4206: ------------------------------------------- Author: ASF GitHub Bot Created on: 31/Mar/23 13:06 Start Date: 31/Mar/23 13:06 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4418: URL: https://github.com/apache/activemq-artemis/pull/4418#discussion_r1154453055 ########## artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ObjectCleaner.java: ########## @@ -0,0 +1,26 @@ +/* + * 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.utils; + +public class ObjectCleaner { + + public static void register(Object obj, Runnable callback) { + io.netty.util.internal.ObjectCleaner.register(obj, callback); Review Comment: the JDK Cleaner is using Phantom References, which they might take longer to be released. While the WeakReferences (used by Netty) are working more reliably. I looked into writing my own cleaner but the one from Netty was ready to use :) I can always fork it. Issue Time Tracking ------------------- Worklog Id: (was: 854188) Time Spent: 3h (was: 2h 50m) > Unreferenced AMQP Large Messages are not removed > ------------------------------------------------ > > Key: ARTEMIS-4206 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4206 > Project: ActiveMQ Artemis > Issue Type: Bug > Reporter: Clebert Suconic > Assignee: Clebert Suconic > Priority: Major > Fix For: 2.29.0 > > Time Spent: 3h > Remaining Estimate: 0h > > Say you crashed the server after the ack, and before the file.remove, and the > journal. record removal. > The AMQP Large Message may not be removed right away, requiring a restart of > the broker. > At this point this is really caused by ARTEMIS-4193 and only affected 2.29.0 > and no previous versions -- This message was sent by Atlassian Jira (v8.20.10#820010)