vvysotskyi commented on code in PR #2655: URL: https://github.com/apache/drill/pull/2655#discussion_r991589179
########## exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistry.java: ########## @@ -34,12 +34,22 @@ public interface StoragePluginRegistry extends Iterable<Map.Entry<String, Storag @SuppressWarnings("serial") public static class PluginException extends Exception { + + public final StoragePlugin plugin; Review Comment: Looks like it is not used now ########## contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java: ########## @@ -108,19 +109,22 @@ public Optional<DataSource> getDataSource(UserCredentials userCredentials) { )); } - public SqlDialect getDialect(DataSource dataSource) { - return JdbcSchema.createDialect( - SqlDialectFactoryImpl.INSTANCE, - dataSource - ); + public synchronized SqlDialect getDialect(UserCredentials userCredentials) { + if (sqlDialect == null) { Review Comment: Please use double-check to avoid extra overhead caused by synchronization for most of the calls when the `sqlDialect` is already created. -- 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: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org