twdsilva 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_r339800921
##########
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:
SGTM.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services