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

James Taylor commented on PHOENIX-1147:
---------------------------------------

I see. So it's a case where the parent table is in the cache, but the index 
table isn't. We need to make sure that the meta data cache is maintained inside 
of PMetaDataImpl rather than in MetaDataClient. Otherwise, the global cache we 
keep on ConnectionQueryServices will get out of sync with the one we keep on 
PhoenixConnection.

So to cover this case, add the dataTableName as an additional argument to 
MetaDataMutated#removeTable:
{code}
    PMetaData removeTable(PName tenantId, String tableName, String 
parentTableName) throws SQLException;
{code}

Then in PMetaDataImpl.removeTable(), just use code similar to what you added in 
MetaDataClient to lookup the parent table and remove the tableName from the 
indexes if found.

> Ensure data table is sent to client if index table changes states
> -----------------------------------------------------------------
>
>                 Key: PHOENIX-1147
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1147
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0, 5.0.0
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>         Attachments: Phoenix-1147-v1.patch, Phoenix-1147-v2.patch, 
> Phoenix-1147-v3.patch
>
>
> Add one test to cover RegionServer being killed while index is begin updated
> Add steps to make sure UPSERT & SELECT should still work after index is 
> disabled.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to