You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Eugene Koifman (JIRA)" <ji...@apache.org> on 2017/04/26 00:25:04 UTC

[jira] [Commented] (HIVE-16534) Add capability to tell aborted transactions apart from open transactions in ValidTxnList

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

Eugene Koifman commented on HIVE-16534:
---------------------------------------

I think this needs some tests.  For example, 
_int index = Arrays.binarySearch(exceptions, txn);_should return -1 if txn is not found.
which means _if (abortedBits.get(index)) {_ will fail with some ArrayIndexOutOfBounds or something


ValidReadTxnList.isTxnRangeAborted() is doing (maxTxnId-minTxnId) binary searches.  Why not just do 1 for minTxnId and then use nextSetBit(int fromIndex) to find next aborted txn and see if it equals minTxnId + 1, etc.


Also, you don't need to override isTxnRangeAborted() ValidCompactorTxnList.

some javadoc on new methods would be useful


> Add capability to tell aborted transactions apart from open transactions in ValidTxnList
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-16534
>                 URL: https://issues.apache.org/jira/browse/HIVE-16534
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>            Reporter: Wei Zheng
>            Assignee: Wei Zheng
>         Attachments: HIVE-16534.1.patch
>
>
> Currently in ValidReadTxnList, open transactions and aborted transactions are stored together in one array. That makes it impossible to extract just aborted transactions or open transactions.
> For ValidCompactorTxnList this is fine, since we only store aborted transactions but no open transactions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)