You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Mohit Sabharwal (JIRA)" <ji...@apache.org> on 2016/11/07 23:42:58 UTC
[jira] [Created] (HIVE-15145) Alter partition and fs renameDir
should happen in same transaction
Mohit Sabharwal created HIVE-15145:
--------------------------------------
Summary: Alter partition and fs renameDir should happen in same transaction
Key: HIVE-15145
URL: https://issues.apache.org/jira/browse/HIVE-15145
Project: Hive
Issue Type: Improvement
Reporter: Mohit Sabharwal
Assignee: Mohit Sabharwal
In HiveAlterTable#alterPartition, the rename partition logic is as follows:
- open txn
- db.alterPartition(old, new)
- commit txn
- fs.mkdirs
- if mkdirs fails
-- open txn
-- db.alterPartition(new, old)
-- commit txn
Instead, both db.alterPartition(old, new) and fs.mkdirs can be moved under a single transaction.
Currently, if the second db.alterPartition(new, old) fails, we have a partition metadata committed without corresponding partition directory.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)