Skip to content

Commit

Permalink
Update TxUtils#createDummyTransaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
anwar6953 committed Sep 22, 2017
1 parent 4a6cb30 commit 30ce7c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 30ce7c2

Please sign in to comment.