deniskuzZ commented on code in PR #4491:
URL: https://github.com/apache/hive/pull/4491#discussion_r1274481502
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnUtils.java:
##########
@@ -77,15 +77,14 @@ public static ValidTxnList
createValidTxnListForCleaner(GetOpenTxnsResponse txns
break;
}
if (abortedBits.get(i)) {
- exceptions[i] = txnId;
+ exceptions[i++] = txnId;
} else {
if (isAbortCleanup) {
- exceptions[i] = txnId;
+ exceptions[i++] = txnId;
} else {
- assert false : JavaUtils.txnIdToString(txnId) + " is open and <=
hwm:" + highWatermark;
+ assert (minOpenTxn == Long.MAX_VALUE) :
JavaUtils.txnIdToString(txnId) + " is open and <= hwm:" + highWatermark;
Review Comment:
- Open txns are not added to the exceptions list when isAbortCleanup=false,
only aborts.
- When there are no open write txns and we rely on MinHistoryWriteId,
minOpenTxn=Long.MAX_VALUE.
- `assert` is only executed during the test phase, unless -ea option is
provided
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]