[ 
https://issues.apache.org/jira/browse/HIVE-24900?focusedWorklogId=568621&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-568621
 ]

ASF GitHub Bot logged work on HIVE-24900:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Mar/21 20:16
            Start Date: 18/Mar/21 20:16
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on a change in pull request #2086:
URL: https://github.com/apache/hive/pull/2086#discussion_r597211444



##########
File path: ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands3.java
##########
@@ -463,6 +463,48 @@ public void testCompactionAbort() throws Exception {
     runCleaner(hiveConf);
   }
 
+
+  @Test
+  public void testCompactionAbortLeftoverFiles() throws Exception {
+    MetastoreConf.setBoolVar(hiveConf, 
MetastoreConf.ConfVars.CREATE_TABLES_AS_ACID, true);
+    
+    dropTable(new String[] {"T"});
+    //note: transaction names T1, T2, etc below, are logical, the actual txnid 
will be different
+    runStatementOnDriver("create table T (a int, b int) stored as orc");
+    runStatementOnDriver("insert into T values(0,2)");//makes delta_1_1 in T1
+    runStatementOnDriver("insert into T values(1,4)");//makes delta_2_2 in T2
+
+    //create failed compaction attempt so that compactor txn is aborted
+    HiveConf.setBoolVar(hiveConf, 
HiveConf.ConfVars.HIVETESTMODEFAILAFTERCOMPACTION, true);
+    runStatementOnDriver("alter table T compact 'major'");

Review comment:
       Please add a test to cover the MINOR compaction use case. 
   Note: current implementation doesn't handle delete deltas. Add an update 
statement in your test. You need to handle both delta and delete_delta 
directories. 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 568621)
    Time Spent: 1h 10m  (was: 1h)

> Failed compaction does not cleanup the directories
> --------------------------------------------------
>
>                 Key: HIVE-24900
>                 URL: https://issues.apache.org/jira/browse/HIVE-24900
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Ramesh Kumar Thangarajan
>            Assignee: Ramesh Kumar Thangarajan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Failed compaction does not cleanup the directories



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to