This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new c5be8b72c1 ARTEMIS-4298 and ARTEMIS-4215 Fixing duplicated entries on
historyFiles on journalRetention during a replication
c5be8b72c1 is described below
commit c5be8b72c14860ccff0eafec0315f4383330fc42
Author: clebert <[email protected]>
AuthorDate: Wed May 31 12:52:18 2023 -0400
ARTEMIS-4298 and ARTEMIS-4215 Fixing duplicated entries on historyFiles on
journalRetention during a replication
This is Fixing BackupSyncJournalTest::testReplicationDuringSync
ARTEMIS-4215 introduced a failure on the testsuite.
However the failure is non related to the Buffer itself. it introduced a
race that unveiled ARTEMIS-4298.
---
.../java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java | 2 ++
.../core/persistence/impl/journal/AbstractJournalStorageManager.java | 1 +
2 files changed, 3 insertions(+)
diff --git
a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
index 6de092d432..2808bcc9c1 100644
---
a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
+++
b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
@@ -2933,6 +2933,8 @@ public class JournalImpl extends JournalBase implements
TestableJournal, Journal
fileFactory.stop();
+ historyPendingFiles.clear();
+
currentFile = null;
} finally {
journalLock.writeLock().unlock();
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
index 91736ea5ed..25429d6b74 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
@@ -1716,6 +1716,7 @@ public abstract class AbstractJournalStorageManager
extends CriticalComponentImp
if (config.getJournalRetentionLocation() != null) {
+ messageJournal.getFileFactory().start();
messageJournal.setHistoryFolder(config.getJournalRetentionLocation(),
config.getJournalRetentionMaxBytes(), config.getJournalRetentionPeriod());
}
messageJournal.start();