[ 
https://issues.apache.org/jira/browse/PHOENIX-7270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Palash Chauhan reassigned PHOENIX-7270:
---------------------------------------

    Assignee: Palash Chauhan

> Always resolve table before DDL operations.
> -------------------------------------------
>
>                 Key: PHOENIX-7270
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7270
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Rushabh Shah
>            Assignee: Palash Chauhan
>            Priority: Major
>
> After we set the UCF = NEVER to all tables, we are validating last ddl 
> timestamps for read and write queries.
> For DDL operations, we are reading the PTable from the client side cache.
> In some cases, after the DDL operations we are updating/invalidating the 
> cache for the table which is being altered but we don't invalidate the cache 
> for the parent table (in case of views) or indexes. 
> When column encoding is set to true, we increment the seq number for base 
> physical table (for views) whenever we create a view. Refer 
> [here|https://github.com/apache/phoenix/blob/master/phoenix-core-client/src/main/java/org/apache/phoenix/schema/MetaDataClient.java#L2924-L2931]
>  for more details. Once the create view command is executed successfully, we 
> only add the view to the cache but we don't update the base table in the 
> cache. This can cause an inconsistency when we use the same cached PTable 
> object for next DDL operations on the base table.
> Solutions:
> 1. Validate last ddl timestamps for table, view hierarchy and indexes for 
> every DDL operations like we do for read and write queries.
> 2. Always resolve the table, view hierarchy and indexes for every DDL 
> operation. It will have the same effect as UCF is set to ALWAYS but just for 
> DDL operations.
> I would prefer option#2 since that will guarantee we always get the latest 
> Ptable object for DDL operations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to