Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.2 798aaeedb -> 78ecfce62
PHOENIX-5017 Fix testRecreateViewWhoseParentWasDropped test flapper Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/78ecfce6 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/78ecfce6 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/78ecfce6 Branch: refs/heads/4.x-HBase-1.2 Commit: 78ecfce6276561f163e5b98d5d80cafecd217a9b Parents: 798aaee Author: Thomas D'Silva <tdsi...@apache.org> Authored: Tue Nov 13 15:42:19 2018 -0800 Committer: Thomas D'Silva <tdsi...@apache.org> Committed: Tue Nov 13 16:34:14 2018 -0800 ---------------------------------------------------------------------- .../phoenix/coprocessor/MetaDataEndpointImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/78ecfce6/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java index d899e32..5562340 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java @@ -2035,8 +2035,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso } } - // check if the table was dropped, but had child views that were have not yet - // been cleaned up by compaction + // check if the table was dropped, but had child views that were have not yet been cleaned up if (!Bytes.toString(schemaName).equals(QueryConstants.SYSTEM_SCHEMA_NAME)) { dropChildViews(env, tenantIdBytes, schemaName, tableName); } @@ -2434,8 +2433,13 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements Coprocesso MetaDataClient client = new MetaDataClient(connection); org.apache.phoenix.parse.TableName viewTableName = org.apache.phoenix.parse.TableName .create(Bytes.toString(viewSchemaName), Bytes.toString(viewName)); - client.dropTable( - new DropTableStatement(viewTableName, PTableType.VIEW, false, true, true)); + try { + client.dropTable( + new DropTableStatement(viewTableName, PTableType.VIEW, false, true, true)); + } + catch (TableNotFoundException e) { + logger.info("Ignoring view "+viewTableName+" as it has already been dropped"); + } } } }