You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2017/04/20 22:07:04 UTC

[jira] [Commented] (PHOENIX-3569) Deadlock when updating both of local and global index

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

Lars Hofhansl commented on PHOENIX-3569:
----------------------------------------

Turns out that this is fixed with PHOENIX-3796. And actually it's almost the same fix there. Great minds think alike :)

[~chia7712], sorry we missed your earlier patch here. Perhaps we should commit your test from this issue and then close?


> Deadlock when updating both of local and global index
> -----------------------------------------------------
>
>                 Key: PHOENIX-3569
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3569
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.9.0, 4.8.2
>            Reporter: Chia-Ping Tsai
>            Priority: Critical
>         Attachments: hbase-root-regionserver-node04.ncku.edu.tw.log, PHOENIX-3569.fail.patch, PHOENIX-3569.v0.patch, PHOENIX-3569.v1.patch
>
>
> We update the global index in Observer#postBatchMutate, but the hook is called before completing the mvcc.
> If ParallelWriterIndexCommitter are busy to update the local index, the other updates for global index will be blocked and the mvcc of data table won't be completed. The deadlock happens since the ParallelWriterIndexCommitter will never complete the updates for local index.
> We can reproduce the deadlock through the following step.
> # create a data table with a local and a global index.
> # create 10+ (DEFAULT_CONCURRENT_INDEX_WRITER_THREADS) threads which disable the auto commit to submit data
> # wait for the deadlock. the rs log will show the following message. "STUCK: MultiVersionConcurrencyControl{readPoint=8790, writePoint=8801}"
> It seems to me that we should update the both of local and global index on the hook of postPut and postDelete.
> Any suggestions are welcomed.



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