drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arina-ielchiieva <...@git.apache.org>
Subject [GitHub] drill pull request #669: DRILL-5044: After the dynamic registration of multi...
Date Tue, 29 Nov 2016 13:37:09 GMT
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/669#discussion_r89994171
  
    --- 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 --
    
    1. I guess having fixed number of retries is enough. Having retry and wait logic, may
lead us to the point where user will have to wait for a long time till registration completes
in case of busy system. With only retry logic we notify user pretty quickly that the system
is busy and it's up to the user to decide when to try to register the function again,
    
    2. Totally agree about recursion, since user may modify number of retry attempts, it's
much better to have while loop to avoid stack overflow.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message