phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maddineni Sukumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3823) Force cache update on MetaDataEntityNotFoundException
Date Wed, 03 May 2017 23:47:04 GMT

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

Maddineni Sukumar commented on PHOENIX-3823:
--------------------------------------------

Hi [~jamestaylor] , 

I was able to write unit test and add a catch() block in PhoenixStatement.executeQuery() for
MetaDataEntityNotFoundException. 
But Its hard to get involved TableName of corresponding query as we are not sending table
name, schema name in ColumnNotFoundException. For example in PTableImpl.getColumnForColumnName()
we are returning exception with just column name but no table and schema name. I added that
info and then I am able to reload cache and then query worked fine in retry. 

It looks like there are other places  where we are not sending table details. I am trying
to fix those first. 

> Force cache update on MetaDataEntityNotFoundException 
> ------------------------------------------------------
>
>                 Key: PHOENIX-3823
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3823
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Maddineni Sukumar
>
> When UPDATE_CACHE_FREQUENCY is used, clients will cache metadata for a period of time
which may cause the schema being used to become stale. If another client adds a column or
a new table or view, other clients won't see it. As a result, the client will get a MetaDataEntityNotFoundException.
Instead of bubbling this up, we should retry after forcing a cache update on the tables involved
in the query.
> The above works well for references to entities that don't yet exist. However, we cannot
detect when some entities are referred to which no longer exists until the cache expires.
An exception is if a physical table is dropped which would be detected immediately, however
we would allow queries and updates to columns which have been dropped until the cache entry
expires (which seems like a reasonable tradeoff IMHO. In addition, we won't start using indexes
on tables until the cache expires.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message