shahrs87 commented on code in PR #1666:
URL: https://github.com/apache/phoenix/pull/1666#discussion_r1343211296
##########
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java:
##########
@@ -417,54 +538,66 @@ private PhoenixResultSet executeQuery(final
CompilableStatement stmt,
e.getSchemaName(),
e.getTableName(), true)
.wasUpdated()) {
//TODO we can log retry count and
error for debugging in LOG table
- return executeQuery(stmt, false,
queryLogger, noCommit);
+ return executeQuery(stmt, false,
queryLogger, noCommit, validateLastDdlTimestamp);
}
}
throw e;
- } catch (RuntimeException e) {
-
+ }
+ catch (StaleMetadataCacheException e) {
+ updateMetrics = false;
+ String planSchemaName =
lastQueryPlan.getTableRef().getTable().getSchemaName().toString();
+ String planTableName =
lastQueryPlan.getTableRef().getTable().getTableName().toString();
+ // force update client metadata cache
+ LOGGER.debug("Force updating client metadata
cache for {}", getInfoString(getLastQueryPlan().getTableRef()));
+ new
MetaDataClient(connection).updateCache(connection.getTenantId(),
planSchemaName, planTableName, true);
Review Comment:
Add a comment saying that this will update the cache for all the parents in
the hieracrchy.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]