hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Kolbasov (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-17849) alterPartition() may fail to rollback transaction
Date Thu, 19 Oct 2017 19:11:00 GMT

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

Alexander Kolbasov reassigned HIVE-17849:
-----------------------------------------


> alterPartition() may fail to rollback transaction
> -------------------------------------------------
>
>                 Key: HIVE-17849
>                 URL: https://issues.apache.org/jira/browse/HIVE-17849
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 2.3.0
>            Reporter: Alexander Kolbasov
>            Assignee: Alexander Kolbasov
>
> In HiveAlterHandle.alterPartition() there is this code:
> {code}
>           try {
>             msdb.openTransaction();
>             msdb.alterPartition(dbname, name, new_part.getValues(), oldPart);
>             if (transactionalListeners != null && !transactionalListeners.isEmpty())
{
>               MetaStoreListenerNotifier.notifyEvent(transactionalListeners,
>                                                     EventMessage.EventType.ALTER_PARTITION,
>                                                     new AlterPartitionEvent(new_part,
oldPart, tbl, success, handler));
>             }
>             revertMetaDataTransaction = msdb.commitTransaction();
>           } catch (Exception ex2) {
>             LOG.error("Attempt to revert partition metadata change failed. The revert
was attempted " +
>                 "because associated filesystem rename operation failed with exception
" + ex.getMessage(), ex2);
>             if (!revertMetaDataTransaction) {
>               msdb.rollbackTransaction();
>             }
>           }
> {code}
> Note that there is no {{finally}} clause, so it is possible for some unchecked exception
to occur in which case the transaction will remain active. Once this happens, all subsequent
transactions on this thread will not behave correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message