[
https://issues.apache.org/jira/browse/HIVE-30281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-30281:
----------------------------------
Labels: pull-request-available (was: )
> File loss when concurrent inserts attempts HDFS rename on same destination
> path
> -------------------------------------------------------------------------------
>
> Key: HIVE-30281
> URL: https://issues.apache.org/jira/browse/HIVE-30281
> Project: Hive
> Issue Type: Bug
> Reporter: Ramit Gupta
> Assignee: Ramit Gupta
> Priority: Major
> Labels: pull-request-available
>
> {{Hive.copyFiles}} moves each task's staged file, such as {{{}000000_0{}}},
> into the table or partition directory. {{pickDestFilePath}} checks
> {{exists()}} and, when that name is free, {{mvFile}} renames the staged file
> to it. Two inserts can both observe the name as missing and both call rename.
> On HDFS, {{FileSystem.rename(Path, Path)}} returns false and leaves the
> source in place when the destination already exists. {{mvFile}} ignored that
> return value and reported the move as successful. The staging directory is
> removed afterward, so the loser's file is deleted while the query still
> succeeds.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)