You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/10/10 19:36:28 UTC
[GitHub] [drill] vvysotskyi commented on a diff in pull request #2655: DRILL-8314: Add support for automatically retrying and disabling broken storage plugins
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-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org