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

ASF GitHub Bot commented on PHOENIX-5076:
-----------------------------------------

GitHub user kadirozde opened a pull request:

    https://github.com/apache/phoenix/pull/421

    PHOENIX-5076 DROP TABLE and DROP VIEW commands fail to drop second or…

    … higher level child views

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kadirozde/phoenix PHOENIX-5076

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/phoenix/pull/421.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #421
    
----
commit a7445bca04b2f7e95ae80b640e64433a26ae898d
Author: Kadir <kozdemir@...>
Date:   2018-12-21T02:15:35Z

    PHOENIX-5076 DROP TABLE and DROP VIEW commands fail to drop second or 
higher level child views

----


> 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