wu-sheng commented on code in PR #10544:
URL: https://github.com/apache/skywalking/pull/10544#discussion_r1139906056


##########
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/common/TableHelper.java:
##########
@@ -54,6 +58,16 @@ public class TableHelper {
     @Getter(lazy = true, value = AccessLevel.PRIVATE)
     private final ConfigService configService = 
moduleManager.find(CoreModule.NAME).provider().getService(ConfigService.class);
 
+    private final LoadingCache<String, Boolean> tableExistence =
+        CacheBuilder.newBuilder()
+                    .expireAfterWrite(10, TimeUnit.MINUTES)
+                    .build(new CacheLoader<>() {
+                        @Override
+                        public @NonNull Boolean load(@NonNull String 
tableName) throws Exception {
+                            return jdbcClient.tableExists(tableName);
+                        }
+                    });

Review Comment:
   How about we have an `expireAfterRead` and do manually remove when `table 
not found` SQL exception? If possible, this could reduce more payload.



-- 
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]

Reply via email to