Github user chtyim commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/61#discussion_r139303849
--- Diff: tephra-core/src/main/java/org/apache/tephra/util/TxUtils.java ---
@@ -75,12 +75,9 @@ public static long getOldestVisibleTimestamp(Map<byte[],
Long> ttlByFamily, Tran
* @return The oldest timestamp that will be visible for the given
transaction and TTL configuration
*/
public static long getOldestVisibleTimestamp(Map<byte[], Long>
ttlByFamily, Transaction tx, boolean readNonTxnData) {
- if (readNonTxnData) {
- long maxTTL = getMaxTTL(ttlByFamily);
- return maxTTL < Long.MAX_VALUE ? System.currentTimeMillis() - maxTTL
: 0;
- }
-
- return getOldestVisibleTimestamp(ttlByFamily, tx);
+ long ttlFactor = readNonTxnData ? 1 : TxConstants.MAX_TX_PER_MS;
+ long maxTTL = getMaxTTL(ttlByFamily);
--- End diff --
the `maxTTL` should be capped by `Math.min(maxTTL, Long.MAX_VALUE /
ttlFactor)`, right?
---