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 2015/12/02 23:31:11 UTC

[jira] [Commented] (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=15036775#comment-15036775 ] 

Alicia Ying Shu commented on PHOENIX-2221:
------------------------------------------

[~jamestaylor] Thanks for the review. Summarize the changes below with a revised patch.

1) In Indexer.java, it needs a constructor with only PerRegionIndexWriteCache as the parameter. So need to have a constructor for that. 
2) Since we do not want the delegator of stopping region server ever to be null, instantiates one of KillServerOnFailurePolicy.
3) Test is now derived from BaseHBaseManagedTimeIT.
4) In Indexer, make INDEX_RECOVERY_FAILURE_POLICY_KEY public
5) No change in PhoenixIndexCodec. Set INDEX_RECOVERY_FAILURE_POLICY_KEY in the hbase-site.xml.
6) Need changes in QueryOptimizer because during index rebuild, index is readable. When choosing a plan for a scan submitted during index rebuild, if an index is in READABLE state, we can choose index scan since there is no new data written except those failed ones. This applies to those applications that can tolerate minor data loss during a minimum time.
7) Add a new READABLE index state. The reason we used PIndexState.READABLE is that during index rebuild, index is not blocked for read. It is still readable. Only the writes to data table are blocked.

> 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
>         Attachments: PHOENIX-2221-v1.patch, PHOENIX-2221-v2.patch, PHOENIX-2221.patch
>
>
> 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)