[ https://issues.apache.org/jira/browse/HIVE-8797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225510#comment-14225510 ]
Thejas M Nair commented on HIVE-8797: ------------------------------------- Regarding {code} + if (CheckJDOException.isJDODataStoreException(e)) { + // Using utility method above, so that JDODataStoreException doesn't + // have to be used here. This helps avoid adding jdo dependency for + // hcatalog client uses + LOG.debug("Caught JDO exception, trying to alter partition instead"); + tpart = getMSC().getPartitionWithAuthInfo(tbl.getDbName(), {code} Can JDODataStoreException be thrown in cases other than this race condition ? If that is possible, I think it would be better to check if tpart above is null and throw that exception. Otherwise, we would get NPE in such cases from alterPartitionSpec . > Simultaneous dynamic inserts can result in "partition already exists" error > --------------------------------------------------------------------------- > > Key: HIVE-8797 > URL: https://issues.apache.org/jira/browse/HIVE-8797 > Project: Hive > Issue Type: Bug > Affects Versions: 0.14.0 > Reporter: Alan Gates > Assignee: Alan Gates > Attachments: HIVE-8797.2.patch, HIVE-8797.patch > > > If two users attempt a dynamic insert into the same new partition at the same > time, a possible race condition exists where both will attempt to create the > partition and one will fail. -- This message was sent by Atlassian JIRA (v6.3.4#6332)