You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/10/28 21:17:47 UTC

[GitHub] [phoenix] ChinmaySKulkarni commented on a change in pull request #607: PHOENIX-5103: Can't create/drop table using 4.14 client against 4.15 server (Addendum)

ChinmaySKulkarni commented on a change in pull request #607: PHOENIX-5103: Can't create/drop table using 4.14 client against 4.15 server (Addendum)
URL: https://github.com/apache/phoenix/pull/607#discussion_r339797391
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ##########
 @@ -2355,9 +2362,16 @@ private MetaDataMutationResult doDropTable(byte[] key, byte[] tenantId, byte[] s
                                     EnvironmentEdgeManager.currentTimeMillis(), null);
                         }
                         try {
-                            PhoenixConnection conn = QueryUtil.getConnectionOnServer(env.getConfiguration()).unwrap(PhoenixConnection.class);
-                            Task.addTask(conn, PTable.TaskType.DROP_CHILD_VIEWS, Bytes.toString(tenantId),
-                                    Bytes.toString(schemaName), Bytes.toString(tableName), this.accessCheckEnabled);
+                            if (clientVersion >= MIN_SPLITTABLE_SYSTEM_CATALOG) {
+                                PhoenixConnection conn =
+                                        QueryUtil.getConnectionOnServer(env.getConfiguration())
+                                                .unwrap(PhoenixConnection.class);
+                                Task.addTask(conn, PTable.TaskType.DROP_CHILD_VIEWS,
+                                        Bytes.toString(tenantId), Bytes.toString(schemaName),
+                                        Bytes.toString(tableName), this.accessCheckEnabled);
+                            }
+                            // else: the client version is old, so we cannot add a task to cleanup
 
 Review comment:
   @twdsilva makes sense. I will handle that as part of PHOENIX-5544. Do the other changes to support creating/dropping a table look good?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services