deniskuzZ commented on code in PR #6498:
URL: https://github.com/apache/hive/pull/6498#discussion_r3309445436
##########
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:
> It can happen that a compaction is marked as finished and get into "ready
for cleaning" state, but the compaction txn stays open. And when the timeout
reached, the txn gets aborted.
could we handle this in abortTxn? if txnType=3 (compaction) cleanup the
COMPACTION_QUEUE as well?
--
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]