From 30ce7c264ac51c91b9fb2d3ecec23aed1c69d84b Mon Sep 17 00:00:00 2001 From: Ali Anwar Date: Thu, 21 Sep 2017 17:40:20 -0700 Subject: [PATCH] Update TxUtils#createDummyTransaction. --- .../src/main/java/org/apache/tephra/util/TxUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java b/tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java index 9619fc49..f6df3c94 100644 --- a/tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java +++ b/tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java @@ -124,10 +124,13 @@ public static long getMaxVisibleTimestamp(Transaction tx) { * as being written by this transaction (and therefore visible). */ public static Transaction createDummyTransaction(TransactionVisibilityState txVisibilityState) { - return new Transaction(txVisibilityState.getReadPointer(), txVisibilityState.getWritePointer(), + return new Transaction(txVisibilityState.getReadPointer(), + txVisibilityState.getVisibilityUpperBound(), + Long.MAX_VALUE, Longs.toArray(txVisibilityState.getInvalid()), Longs.toArray(txVisibilityState.getInProgress().keySet()), - TxUtils.getFirstShortInProgress(txVisibilityState.getInProgress()), TransactionType.SHORT); + TxUtils.getFirstShortInProgress(txVisibilityState.getInProgress()), TransactionType.SHORT, + new long[0], Transaction.VisibilityLevel.SNAPSHOT); } /**