zhyyu commented on code in PR #174: URL: https://github.com/apache/skywalking-java/pull/174#discussion_r884376447
########## apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/dynamic/ConfigurationDiscoveryService.java: ########## @@ -238,17 +247,25 @@ private void getAgentDynamicConfig() { * Local dynamic configuration center. */ public static class Register { - private final Map<String, WatcherHolder> register = new HashMap<>(); + private final Map<String, List<WatcherHolder>> register = new HashMap<>(); private boolean containsKey(String key) { return register.containsKey(key); } private void put(String key, WatcherHolder holder) { - register.put(key, holder); + List<WatcherHolder> watcherHolderList = register.get(key); Review Comment: > Then that is the issue of `JDBCPreparedStatementSetterInterceptor`. You should not register the watcher repeated, no matter with or without `sync`, it causes a huge perf. impact. Can I use static code block or constructor code block in `JDBCPreparedStatementSetterInterceptor` to register the watcher once? -- 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-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org