SourabhBadhya commented on code in PR #4410:
URL: https://github.com/apache/hive/pull/4410#discussion_r1228295008
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -1295,25 +1288,33 @@ private static boolean timedOut(CompactionInfo ci,
RetentionCounters rc, long pa
&& (rc.hasSucceededMajorCompaction ||
(rc.hasSucceededMinorCompaction && ci.type == CompactionType.MINOR));
}
- private void removeAbortRetryEntries(Connection dbConn, CompactionInfo info)
throws MetaException, RetryException {
- LOG.debug("Going to execute update <{}>",
DELETE_ABORT_RETRY_ENTRIES_FROM_COMPACTION_QUEUE);
- try (PreparedStatement pStmt =
dbConn.prepareStatement(DELETE_ABORT_RETRY_ENTRIES_FROM_COMPACTION_QUEUE)) {
+ private void removeCompactionAndAbortRetryEntries(Connection dbConn,
CompactionInfo info) throws MetaException, RetryException {
+ String query =
String.format(DELETE_COMPACTION_AND_ABORT_RETRY_ENTRIES_FROM_COMPACTION_QUEUE,
+ info.partName != null ? " = ? " : " IS NULL ", info.id > 0 ? " OR
\"CQ_ID\" = ?" : "");
Review Comment:
Replaced it with something readable. This is merging of 2 delete queries
into 1 so I think no tests must be required. Existing tests written as part of
the PR earlier should suffice.
--
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]