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