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

Alexander Kolbasov reassigned HIVE-17736:
-----------------------------------------

    Assignee:     (was: Alexander Kolbasov)

> ObjectStore transaction handling can be simplified
> --------------------------------------------------
>
>                 Key: HIVE-17736
>                 URL: https://issues.apache.org/jira/browse/HIVE-17736
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>    Affects Versions: 3.0.0
>            Reporter: Alexander Kolbasov
>            Priority: Major
>         Attachments: HIVE-17736.01.patch
>
>
> There are many places in ObjectStore that do something like this:
> {code}
>     boolean commited = false;
>    try {
>       openTransaction();
>       commited = commitTransaction();
>     } finally {
>       if (!commited) {
>         rollbackTransaction();
>       }
>     }
> {code}
> We can simplify this in two ways:
> 1) Create a wrapper that calls given piece of code inside the block of code 
> above. This is similar to TransactionManager in Sentry.
> 2) Create a special auto-closeable object that does the check and rollback on 
> close.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to