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/16 18:36:05 UTC

[jira] [Created] (HIVE-14036) prevent insert into acid and non-acid tables in the same txn

Eugene Koifman created HIVE-14036:
-------------------------------------

             Summary: prevent insert into acid and non-acid tables in the same txn
                 Key: HIVE-14036
                 URL: https://issues.apache.org/jira/browse/HIVE-14036
             Project: Hive
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 2.0.0, 1.2.0
            Reporter: Eugene Koifman


{noformat}
create table if not exists tab1 (a int, b int) partitioned by (p string) 
    clustered by (a) into 2  buckets stored as orc TBLPROPERTIES('transactional'='true')
create table if not exists tab_not_acid (a int, b int, p string)
insert into tab_not_acid values(1,1,'one'),(2,2,'two')

insert into tab1 partition(p) values(3,3,'one'),(4,4,'two')
    //writing both acid and non-acid resources in the same txn
    //tab1 write is a dynamic partition insert
    from tab_not_acid insert into tab1 partition(p)(a,b,p) select a,b,p insert into tab_not_acid(a,b) select a,b where p='two'
{noformat}

Suppose the last insert in the above example is part of a multi-stmt txn which later gets rolled back.  There is no way to rollback the write to the tab_not_acid table.

(In auto-commit mode there is no explicit rollback so this can only fail due to error, which means Move task won't move the files into tables so it's not really an issue)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)