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 12:13:50 UTC
[GitHub] [drill] jnturton commented on a diff in pull request #2655: DRILL-8314: Add support for automatically retrying and disabling broken storage plugins
jnturton commented on code in PR #2655:
URL: https://github.com/apache/drill/pull/2655#discussion_r991218134
##########
exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicRootSchema.java:
##########
@@ -91,22 +91,69 @@ private CalciteSchema getSchema(String schemaName, boolean caseSensitive) {
public SchemaPath resolveTableAlias(String alias) {
return Optional.ofNullable(aliasRegistryProvider.getTableAliasesRegistry()
- .getUserAliases(schemaConfig.getUserName()).get(alias))
+ .getUserAliases(schemaConfig.getUserName()).get(alias))
.map(SchemaPath::parseFromString)
.orElse(null);
}
+ private void attemptToRegisterSchemas(StoragePlugin plugin) throws Exception {
+ long maxAttempts = schemaConfig
+ .getOption(ExecConstants.STORAGE_PLUGIN_ACCESS_ATTEMPTS)
+ .num_val;
+ long attemptDelayMs = schemaConfig
+ .getOption(ExecConstants.STORAGE_PLUGIN_ATTEMPT_DELAY)
+ .num_val;
+ int attempt=0;
+ Exception lastAttemptEx = null;
+
+ while (attempt++ < maxAttempts) {
Review Comment:
@vvysotskyi let me know if you still prefer the use of a library for the retry logic.
--
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