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

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

[~jamestaylor]
>don't assume the type of the delegator to be KillServerOnFailurePolicy
KillServerOnFailurePolicy has the implementation that when updating index 
failed, abort the region server. Need KillServerOnFailurePolicy for not 
reimplementing abort() when catching failed exception.

>I don't understand why any changes are necessary to PhoenixIndexCodec
There are three possible values for INDEX_RECOVERY_FAILURE_POLICY_KEY: null, 
ReadableIndexFailedPolicy and default(PhoenixIndexFailedPolicy). Just use 
IndexFailurePolicy.class.getName() will not set the correct value for 
IndexWriter.INDEX_FAILURE_POLICY_CONF_KEY which is used for indexer committer 
later to determine the policy.

>to create a new PIndexState.BLOCKED value to key off of, and then let the 
>index state transition from BLOCKED to ACTIVE once the partial index rebuild 
>is complete.
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. 

>Don't understand the changes to QueryOptimizer. An index needs to be ACTIVE in 
>order for it to be used. Why the check for READABLE?
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. 





> 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)

Reply via email to