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

Kadir OZDEMIR commented on PHOENIX-5076:
----------------------------------------

[~tdsilva], the PR is ready for review

> DROP TABLE and DROP VIEW commands fail to drop second or higher level child 
> views
> ---------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5076
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5076
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.0
>            Reporter: Kadir OZDEMIR
>            Priority: Major
>
> We have seen large number of orphan views in our production environments. We 
> know that if the metadata operations involve in updating multiple rows and 
> these operations are interrupted because of failures, we do not have a way of 
> auto-recovering from these failures and completing these interrupted 
> operations. Our tables can have views and these views can have their views 
> recursively. Multiple levels of views are not rare in our production 
> clusters. While failures during drop table operation can lead to orphan 
> views, they are not sufficient to explain why we experience large number of 
> orphan views. 
>  
> It turns out that the method (doDropTable) that is used to drop tables and 
> views drops only the first level child views of tables. This seems to be the 
> main root cause for orphan views. doDropTable() is recursive only when the 
> table type is TABLE or SYSTEM. The table type for views is VIEW. The 
> findChildViews method returns the first level child views. So, doDropTable 
> ignores dropping views of views (i.e., second or higher level views).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to