Description
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:
create table T (name char(50)) partitioned by (ds string);
and the following two queries are launched at the same time, from different sessions:
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
Attachments
Attachments
Issue Links
- relates to
-
HIVE-8797 Simultaneous dynamic inserts can result in "partition already exists" error
- Resolved