[ https://issues.apache.org/jira/browse/HIVE-17736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Kolbasov reassigned HIVE-17736: ----------------------------------------- > 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 > Assignee: Alexander Kolbasov > > 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 (v6.4.14#64029)