activemq-artemis git commit: ARTEMIS-1248 Fixing regression on Page.writing to live page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

activemq-artemis git commit: ARTEMIS-1248 Fixing regression on Page.writing to live page

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 84f830cb0 -> 3e48cd778


ARTEMIS-1248 Fixing regression on Page.writing to live page

This is fixing ReplicatedPagedFailoverTest.testCommitOccurredUnblockedAndResendNoDuplicates
Even though the issue is not on replication.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3e48cd77
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3e48cd77
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3e48cd77

Branch: refs/heads/master
Commit: 3e48cd7787ff3f17cd825d892fdfd87d48becf6a
Parents: 84f830c
Author: Clebert Suconic <[hidden email]>
Authored: Wed Jul 12 10:12:36 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Wed Jul 12 10:12:41 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/artemis/core/paging/impl/Page.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3e48cd77/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java
----------------------------------------------------------------------
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 cd6dbd8..daf02a2 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<Page> {
 
       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);
       }

Loading...