deniskuzZ commented on code in PR #4313:
URL: https://github.com/apache/hive/pull/4313#discussion_r1221996413


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/handler/AbortedTxnCleaner.java:
##########
@@ -79,8 +79,8 @@ public List<Runnable> getTasks() throws MetaException {
     List<CompactionInfo> readyToCleanAborts = 
txnHandler.findReadyToCleanAborts(abortedTimeThreshold, abortedThreshold);
 
     if (!readyToCleanAborts.isEmpty()) {
-      return readyToCleanAborts.stream().map(ci -> 
ThrowingRunnable.unchecked(() ->
-                      clean(ci, ci.txnId > 0 ? ci.txnId : Long.MAX_VALUE, 
metricsEnabled)))
+      return readyToCleanAborts.stream().map(info -> 
ThrowingRunnable.unchecked(() ->
+                      clean(info, info.txnId, metricsEnabled)))

Review Comment:
   i think we should use `CQ_NEXT_TXN_ID` = (minOpenWriteTxn - 1) instead of 
CQ_TXN_ID, to be consistent (hwm for committed write txn).
   and then minOpenWriteTxn = ci.nextTxnId + 1



##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/handler/AbortedTxnCleaner.java:
##########
@@ -79,8 +79,8 @@ public List<Runnable> getTasks() throws MetaException {
     List<CompactionInfo> readyToCleanAborts = 
txnHandler.findReadyToCleanAborts(abortedTimeThreshold, abortedThreshold);
 
     if (!readyToCleanAborts.isEmpty()) {
-      return readyToCleanAborts.stream().map(ci -> 
ThrowingRunnable.unchecked(() ->
-                      clean(ci, ci.txnId > 0 ? ci.txnId : Long.MAX_VALUE, 
metricsEnabled)))
+      return readyToCleanAborts.stream().map(info -> 
ThrowingRunnable.unchecked(() ->
+                      clean(info, info.txnId, metricsEnabled)))

Review Comment:
   i think we should use `CQ_NEXT_TXN_ID` = (minOpenWriteTxn - 1) instead of 
CQ_TXN_ID, to be consistent (hwm for committed write txn).
   and then minOpenWriteTxn = ci.nextTxnId + 1
   WDYT?



-- 
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]

Reply via email to