You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2018/11/15 06:56:17 UTC

[2/6] phoenix git commit: PHOENIX-5017 Fix testRecreateViewWhoseParentWasDropped test flapper

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/c7a40093
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c7a40093
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c7a40093

Branch: refs/heads/omid2
Commit: c7a400933c25de8324b19f085ea267e0ff11e5a2
Parents: 8cd7898
Author: Thomas D'Silva <td...@apache.org>
Authored: Tue Nov 13 15:42:19 2018 -0800
Committer: Thomas D'Silva <td...@apache.org>
Committed: Tue Nov 13 15:43:45 2018 -0800

----------------------------------------------------------------------
 .../phoenix/coprocessor/MetaDataEndpointImpl.java       | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c7a40093/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");
+                    }
                 }
             }
         }