Repository: phoenix Updated Branches: refs/heads/master 4b4466f9b -> dfff4e8ca
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/dfff4e8c Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/dfff4e8c Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/dfff4e8c Branch: refs/heads/master Commit: dfff4e8ca0dd8dd94b261508bd77c2ed74091f83 Parents: 4b4466f Author: Thomas D'Silva <[email protected]> Authored: Tue Nov 13 15:42:19 2018 -0800 Committer: Thomas D'Silva <[email protected]> Committed: Tue Nov 13 16:35:37 2018 -0800 ---------------------------------------------------------------------- .../phoenix/coprocessor/MetaDataEndpointImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/dfff4e8c/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 462e853..e925c45 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 @@ -2039,8 +2039,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements RegionCopr } } - // 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); } @@ -2452,8 +2451,13 @@ public class MetaDataEndpointImpl extends MetaDataProtocol implements RegionCopr 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"); + } } } }
