[
https://issues.apache.org/jira/browse/HIVE-26116?focusedWorklogId=752971&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-752971
]
ASF GitHub Bot logged work on HIVE-26116:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Apr/22 16:03
Start Date: 05/Apr/22 16:03
Worklog Time Spent: 10m
Work Description: klcopp commented on code in PR #3177:
URL: https://github.com/apache/hive/pull/3177#discussion_r842986110
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -320,10 +320,19 @@ private boolean
foundCurrentOrFailedCompactions(ShowCompactResponse compactions,
if (compactions.getCompacts() == null) {
return false;
}
+
+ //In case of an aborted Dynamic partition insert, the created entry in the
compaction queue does not contain
+ //a partition name even for partitioned tables. As a result it can happen
that the ShowCompactResponse contains
+ //an element without partition name for partitioned tables. Therefore, it
is necessary to check the partition name of
+ //the ShowCompactResponseElement even if the CompactionInfo.partName is
not null. These special compaction requests
+ //are skipped by the worker, and only cleaner will pick them up, so in
this special case it is OK to schedule a
+ //compaction for the particular table and partition even if the dynamic
partition abort originated compaction request
+ //is still in WORKING or INITIATED state.
Review Comment:
It's also okay because the DP abort compaction doesn't specify a partition,
so it can't count as a compaction on the partition we are currently
investigating.
Issue Time Tracking
-------------------
Worklog Id: (was: 752971)
Time Spent: 50m (was: 40m)
> Fix handling of compaction requests originating from aborted dynamic
> partition queries in Initiator
> ---------------------------------------------------------------------------------------------------
>
> Key: HIVE-26116
> URL: https://issues.apache.org/jira/browse/HIVE-26116
> Project: Hive
> Issue Type: Bug
> Reporter: László Végh
> Assignee: László Végh
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Compaction requests originated from an abort of a dynamic partition insert
> can cause a NPE in Initiator.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)