Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/669#discussion_r89848150 --- 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(); if (retryAttempts-- == 0) { throw new DrillRuntimeException("Failed to update remote function registry. Exceeded retry attempts limit."); } initRemoteRegistration(functions, jarManager, remoteRegistry, retryAttempts); - } finally { - if (cleanUp) { - jarManager.deleteQuietlyFromRegistryArea(); - } + } catch (Exception e) { --- End diff -- Since recursion is used on retry, won't we end up deleting the jar multiple times? No harm, but seems odd...
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---