[
https://issues.apache.org/jira/browse/HIVE-18639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16354366#comment-16354366
]
Vihang Karajgaonkar commented on HIVE-18639:
--------------------------------------------
LGTM +1
> HiveMetaStoreFsImpl#deleteDir should check return value of
> FileUtils#moveToTrash
> --------------------------------------------------------------------------------
>
> Key: HIVE-18639
> URL: https://issues.apache.org/jira/browse/HIVE-18639
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Priority: Major
> Attachments: HIVE-18639.1.patch
>
>
> {{HiveMetaStoreFsImpl#deleteDir}} moves a dir to a the trash, but then
> doesn't check if {{FileUtils#moveToTrash}} returns true or not. Then it
> checks if the file exists, and throes an exception if it doesn't. If
> {{FileUtils#moveToTrash}} returns {{true}} then the {{exists}} check is not
> necessary. Before HIVE-15880 the code was reading the return value of
> {{delete}} and then conditionally ran the {{exists}} check, we should go back
> to the old behavior. This can also cause problems on filesystems like S3.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)