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

James Taylor commented on PHOENIX-2221:
---------------------------------------

[~ayingshu] - we plan to do the 4.7.0 as soon as we can in January - just 
waiting for a few straggler issues to come in.

The way you'd do this is by caching INDEX_DISABLE_TIMESTAMP in a member 
variable in PTable with a new getter for it in the interface. The value is 
already written to the table header row, so you'd just need to read the value 
in MetaDataEndpointImpl:
{code}
    private PTable getTable(RegionScanner scanner, long clientTimeStamp, long 
tableTimeStamp)
{code}
and pass it through the {{PTableImpl.makePTable()}} call toward the end of that 
method.

The mechanism is already in place for the PTable to make it's way over to the 
client side, so then you'd just be using the new 
{{PTable.getIndexDisableTimestamp()}} method you add.

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