hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei Zheng (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-14400) Handle concurrent insert with dynamic partition
Date Tue, 02 Aug 2016 00:19:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-14400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Wei Zheng updated HIVE-14400:
-----------------------------
    Status: Patch Available  (was: Open)

> Handle concurrent insert with dynamic partition
> -----------------------------------------------
>
>                 Key: HIVE-14400
>                 URL: https://issues.apache.org/jira/browse/HIVE-14400
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 2.2.0
>            Reporter: Wei Zheng
>            Assignee: Wei Zheng
>         Attachments: HIVE-14400.1.patch
>
>
> With multiple users concurrently issuing insert statements on the same partition has
a side effect that some queries may not see a partition at the time when they're issued, but
will realize the partition is actually there when it is trying to add such partition to the
metastore and thus get AlreadyExistsException, because some earlier query just created it
(race condition).
> For example, imagine such a table is created:
> {code}
> create table T (name char(50)) partitioned by (ds string) clustered by (name) into 2
buckets stored as orc tblproperties('transactional'='true');
> {code}
> and the following two queries are launched at the same time, from different sessions:
> {code}
> insert into table T partition (ds) values ('Bob', 'today'); -- creates the partition
'today'
> insert into table T partition (ds) values ('Joe', 'today'); -- will fail with AlreadyExistsException
> {code}



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

Mime
View raw message