You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Eugene Koifman (JIRA)" <ji...@apache.org> on 2016/06/09 17:58:21 UTC
[jira] [Created] (HIVE-13980) create table as select should acquire
X lock on target table
Eugene Koifman created HIVE-13980:
-------------------------------------
Summary: create table as select should acquire X lock on target table
Key: HIVE-13980
URL: https://issues.apache.org/jira/browse/HIVE-13980
Project: Hive
Issue Type: Bug
Components: Transactions
Affects Versions: 1.0.0
Reporter: Eugene Koifman
hive> create table test.dummy as select * from oraclehadoop.dummy;
This acquires SHARED_READ on oraclehadoop.dummy table and SHARED_READ on _test_ database.
The effect is that you can drop _test.dummy_ from another session while the insert is still in progress.
This operation is a bit odd in that it combines a DDL operation which is not transactional with a DML operation which is.
If it were to fail in the middle, the target table would remain. This can't be fixed easily but we should get an X lock on _test.dummy_.
The workaround is to split this into 2 commands
1. create table
2. perform insert
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)