[
https://issues.apache.org/jira/browse/DRILL-5044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702754#comment-15702754
]
ASF GitHub Bot commented on DRILL-5044:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/669#discussion_r89847859
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/CreateFunctionHandler.java
---
@@ -175,22 +175,20 @@ private void initRemoteRegistration(List<String>
functions,
List<Jar> remoteJars =
remoteRegistry.getRegistry(version).getJarList();
validateAgainstRemoteRegistry(remoteJars, jarManager.getBinaryName(),
functions);
jarManager.copyToRegistryArea();
- boolean cleanUp = true;
List<Jar> jars = Lists.newArrayList(remoteJars);
jars.add(Jar.newBuilder().setName(jarManager.getBinaryName()).addAllFunctionSignature(functions).build());
Registry updatedRegistry =
Registry.newBuilder().addAllJar(jars).build();
try {
remoteRegistry.updateRegistry(updatedRegistry, version);
- cleanUp = false;
} catch (VersionMismatchException ex) {
+ jarManager.deleteQuietlyFromRegistryArea();
--- End diff --
I wonder about the retry approach. If we get a version mis-match, it means
that something has changed: some other agent is modifying the registry at the
same time. How should this be handed? Fixed number of retry? Wait and retry?
Presumably, after some time, the system will get less busy, or we'll finally
get our crack at the registry.
Also, is it wise to use recursion to retry? Doing so causes a stack depth
proportional to the retry count, which may not be ideal. Loop instead?
> After the dynamic registration of multiple jars simultaneously not all UDFs
> were registered
> -------------------------------------------------------------------------------------------
>
> Key: DRILL-5044
> URL: https://issues.apache.org/jira/browse/DRILL-5044
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Drill
> Affects Versions: 1.9.0
> Reporter: Roman
> Assignee: Paul Rogers
>
> I tried to register 21 jars simultaneously (property 'udf.retry-attempts' =
> 30) and not all jars were registered. As I see in output, all function were
> registered and /staging directory was empty, but not all of jars were moved
> into /registry directory.
> For example, after simultaneously registration I saw "The following UDFs in
> jar test-1.1.jar have been registered: [test1(VARCHAR-REQUIRED)" message, but
> this jar was not in /registry directory. When I tried to run function test1,
> I got this error: "Error: SYSTEM ERROR: SqlValidatorException: No match found
> for function signature test1(<CHARACTER>)". And when I tried to reregister
> this jar, I got "Jar with test-1.1.jar name has been already registered".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)