You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kl...@apache.org on 2022/03/09 08:29:10 UTC
[hive] branch master updated: HIVE-26010: Compactions not picked up by cleaner if CQ_COMMIT_TIME is null and delayed cleaning is enabled (Laszlo Vegh, reviewed by Karen Coppage)
This is an automated email from the ASF dual-hosted git repository.
klcopp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 703a61f HIVE-26010: Compactions not picked up by cleaner if CQ_COMMIT_TIME is null and delayed cleaning is enabled (Laszlo Vegh, reviewed by Karen Coppage)
703a61f is described below
commit 703a61f2f6e474699162f26e02b77eaac18cc723
Author: veghlaci05 <90...@users.noreply.github.com>
AuthorDate: Wed Mar 9 09:28:55 2022 +0100
HIVE-26010: Compactions not picked up by cleaner if CQ_COMMIT_TIME is null and delayed cleaning is enabled (Laszlo Vegh, reviewed by Karen Coppage)
Closes #3080.
---
.../java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
index 730b5ec..e691664 100644
--- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
+++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
@@ -354,7 +354,7 @@ class CompactionTxnHandler extends TxnHandler {
whereClause += " AND (\"CQ_NEXT_TXN_ID\" <= " + minOpenTxnWaterMark + " OR \"CQ_NEXT_TXN_ID\" IS NULL)";
}
if (retentionTime > 0) {
- whereClause += " AND \"CQ_COMMIT_TIME\" < (" + getEpochFn(dbProduct) + " - " + retentionTime + ")";
+ whereClause += " AND (\"CQ_COMMIT_TIME\" < (" + getEpochFn(dbProduct) + " - " + retentionTime + ") OR \"CQ_COMMIT_TIME\" IS NULL)";
}
String s = "SELECT \"CQ_ID\", \"cq1\".\"CQ_DATABASE\", \"cq1\".\"CQ_TABLE\", \"cq1\".\"CQ_PARTITION\"," +
" \"CQ_TYPE\", \"CQ_RUN_AS\", \"CQ_HIGHEST_WRITE_ID\", \"CQ_TBLPROPERTIES\"" +