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 Wed, 03 Aug 2016 03:00:26 GMT

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

Wei Zheng updated HIVE-14400:
-----------------------------
       Resolution: Fixed
    Fix Version/s: 2.1.1
                   2.2.0
           Status: Resolved  (was: Patch Available)

Committed to master and branch-2.1. Thanks Eugene for the review.

> 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
>             Fix For: 2.2.0, 2.1.1
>
>         Attachments: HIVE-14400.1.patch, HIVE-14400.2.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);
> {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