You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/01/26 11:41:23 UTC

[GitHub] [shardingsphere] terrymanu commented on a change in pull request #15093: Avoid checking metadata refresh in each execution

terrymanu commented on a change in pull request #15093:
URL: https://github.com/apache/shardingsphere/pull/15093#discussion_r792553079



##########
File path: shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/communication/DatabaseCommunicationEngine.java
##########
@@ -100,6 +103,20 @@ public DatabaseCommunicationEngine(final String driverType, final ShardingSphere
     
     protected void refreshMetaData(final ExecutionContext executionContext) throws SQLException {
         SQLStatement sqlStatement = executionContext.getSqlStatementContext().getSqlStatement();
+        Boolean needToRefreshMetaData = NEED_TO_REFRESH_META_DATA.get(sqlStatement.getClass());
+        if (null == needToRefreshMetaData) {
+            needToRefreshMetaData = NEED_TO_REFRESH_META_DATA.computeIfAbsent(sqlStatement.getClass(),

Review comment:
       This is for refresh only, could we consider about move them into MetaDataRefreshEngine class?




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org