From 3e48cd7787ff3f17cd825d892fdfd87d48becf6a Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Wed, 12 Jul 2017 10:12:36 -0400 Subject: [PATCH] ARTEMIS-1248 Fixing regression on Page.writing to live page This is fixing ReplicatedPagedFailoverTest.testCommitOccurredUnblockedAndResendNoDuplicates Even though the issue is not on replication. --- .../org/apache/activemq/artemis/core/paging/impl/Page.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java index cd6dbd86a1..daf02a2f42 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java @@ -131,6 +131,9 @@ public final class Page implements Comparable { if (this.canBeMapped) { readFromMapped(storage, messages); + // if the file is open to be written + // it needs to updated the position + file.position(file.size()); } else { readFromSequentialFile(storage, messages); }