[ 
https://issues.apache.org/jira/browse/HIVE-8797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14226801#comment-14226801
 ] 

Alan Gates commented on HIVE-8797:
----------------------------------

So are you proposing we change it to 
{code}
           if (CheckJDOException.isJDODataStoreException(e) && tpart == null) {
              // 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(),
                tbl.getTableName(), pvals, getUserName(), getGroupNames());
              alterPartitionSpec(tbl, partSpec, tpart, inheritTableSpecs, 
partPath);
{code}

or

{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(),
                tbl.getTableName(), pvals, getUserName(), getGroupNames());
              if (tpart != null) {
                alterPartitionSpec(tbl, partSpec, tpart, inheritTableSpecs, 
partPath);
              }
{code}
?

> 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)

Reply via email to