deniskuzZ commented on code in PR #6498:
URL: https://github.com/apache/hive/pull/6498#discussion_r3309678862
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/handler/CompactionCleaner.java:
##########
@@ -99,6 +101,18 @@ private void clean(CompactionInfo ci, long minOpenTxn,
boolean metricsEnabled) t
LOG.info("Starting cleaning for {}, based on min open {}", ci,
(ci.minOpenWriteId > 0) ? "writeId: " + ci.minOpenWriteId : "txnId: "
+ minOpenTxn);
+ if (ci.nextTxnId == 0 && ci.txnId > 0 &&
+ (ci.type == CompactionType.MAJOR || ci.type == CompactionType.MINOR ||
ci.type == CompactionType.REBALANCE)) {
+ TxnStatus status = txnHandler.getTransactionStatus(ci.txnId);
Review Comment:
> If I understand it correctly if a compaction's txn is committed
successfully, the nextTxnId is filled.
why uncommited txn would be even eligible in first place? is it a race
between mark `ready-for-cleaning` and commit/abort? what if we mark after
commit or make commit atomic?
--
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]