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

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

                Author: ASF GitHub Bot
            Created on: 25/Feb/21 07:38
            Start Date: 25/Feb/21 07:38
    Worklog Time Spent: 10m 
      Work Description: pvargacl commented on a change in pull request #2017:
URL: https://github.com/apache/hive/pull/2017#discussion_r582604658



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -4865,10 +4871,26 @@ private boolean drop_partition_common(RawStore ms, 
String catName, String db_nam
 
           if (isArchived) {
             assert (archiveParentDir != null);
-            wh.deleteDir(archiveParentDir, true, mustPurge, needsCm);
+            if (writeTruncatedBase) {
+              try {
+                addTruncateBaseFile(archiveParentDir, writeId, 
archiveParentDir.getFileSystem(getConf()));
+              } catch (Exception e) {
+                throw newMetaException(e);
+              }
+            } else {
+              wh.deleteDir(archiveParentDir, true, mustPurge, needsCm);
+            }
           } else {
             assert (partPath != null);
-            wh.deleteDir(partPath, true, mustPurge, needsCm);
+            if (writeTruncatedBase) {
+              try {
+                addTruncateBaseFile(partPath, writeId, 
archiveParentDir.getFileSystem(getConf()));

Review comment:
       The metadata file has a type information, I think you should not use 
truncate type, rather create a drop type.
   That info might be useful when you do the cleanup and have to decide whether 
to delete the whole partition directory or not




----------------------------------------------------------------
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: 557768)
    Time Spent: 50m  (was: 40m)

> Non blocking DROP PARTITION implementation
> ------------------------------------------
>
>                 Key: HIVE-24753
>                 URL: https://issues.apache.org/jira/browse/HIVE-24753
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Zoltan Chovan
>            Assignee: Zoltan Chovan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Implement a way to execute drop partition operations in a way that doesn't 
> have to wait for currently running read operations to be finished.



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

Reply via email to