You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Alicia Ying Shu (JIRA)" <ji...@apache.org> on 2016/01/13 01:57:39 UTC

[jira] [Comment Edited] (PHOENIX-2221) Option to make data regions not writable when index regions are not available

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

Alicia Ying Shu edited comment on PHOENIX-2221 at 1/13/16 12:57 AM:
--------------------------------------------------------------------

[~jamestaylor] Thanks for the comments. I made some modifications.

1. Need to set index state to be ACTIVE in PUT of PhoenixIndexFailurePolicy.java. Otherwise the coprocessorService would hang on updating unset index state.
2. In MetaDataClient.buildPartialIndexFromTimeStamp(....), have to set the index state to be INACTIVE first for default disable index failure policy since this policy shares some implementation with that of INACTIVE state. Otherwise the test would fail.
3. With current implementation, it is hard to get the index disable timestamp in the test (ReadOnlyIndexFailureIT.java) since the index table was deleted to trigger index failure recovery. The cached table was not updated with the index disable timestamp. When writing to the data table while index is rebuilt, the cached disable index timestamp is 0, while before we used table metadata to check the index state. This is my concern for this approach. Please review the v5 patch. Thanks. 





was (Author: aliciashu):
[~jamestaylor] Thanks for the comments. I made some modifications.

1. Need to set index state to be ACTIVE in PUT of PhoenixIndexFailurePolicy.java. Otherwise the coprocessorService would hang on updating unset index state.
2. In MetaDataClient.buildPartialIndexFromTimeStamp(....), have to set the index state to be INACTIVE first for default disable index failure policy since this policy shares some implementation with that of INACTIVE state. Otherwise the test would fail.
3. With current implementation, it is hard to get the index disable timestamp in the test (ReadOnlyIndexFailureIT.java) since the index table was deleted to trigger index failure recovery. The cached table was not updated with the index disable timestamp. When writing to the data table while index is rebuilt, the cached disable index timestamp is 0, while before we used table metadata to check the index state. This is my concern for this approach. Please review the patch. Thanks. 




> Option to make data regions not writable when index regions are not available
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-2221
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2221
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Devaraj Das
>            Assignee: Alicia Ying Shu
>             Fix For: 4.8.0
>
>         Attachments: DelegateIndexFailurePolicy.java, PHOENIX-2221-v1.patch, PHOENIX-2221-v2.patch, PHOENIX-2221-v3.patch, PHOENIX-2221-v4.patch, PHOENIX-2221-v5.patch, PHOENIX-2221.patch, PHOENIX-2221.wip
>
>
> In one usecase, it was deemed better to not accept writes when the index regions are unavailable for any reason (as opposed to disabling the index and the queries doing bigger data-table scans).
> The idea is that the index regions are kept consistent with the data regions, and when a query runs against the index regions, one can be reasonably sure that the query ran with the most recent data in the data regions. When the index regions are unavailable, the writes to the data table are rejected. Read queries off of the index regions would have deterministic performance (and on the other hand if the index is disabled, then the read queries would have to go to the data regions until the indexes are rebuilt, and the queries would suffer).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)