You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/24 09:28:13 UTC

[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4027: [To rel/0.12][IOTDB-1733] Fix dropping built-in function

SteveYurongSu commented on a change in pull request #4027:
URL: https://github.com/apache/iotdb/pull/4027#discussion_r715460498



##########
File path: server/src/main/java/org/apache/iotdb/db/query/udf/service/UDFRegistrationService.java
##########
@@ -216,7 +216,7 @@ public void deregister(String functionName) throws UDFRegistrationException {
       logger.error(errorMessage);
       throw new UDFRegistrationException(errorMessage);
     }
-
+    registrationInformation.remove(functionName);

Review comment:
       I think it's better to move the `remove` statement to the last. What do you think?  :D
   
   ```suggestion
       if (!information.isTemporary()) {
         try {
           appendDeregistrationLog(functionName);
         } catch (IOException e) {
           registrationInformation.put(functionName, information);
           String errorMessage =
               String.format(
                   "Failed to append UDF log when deregistering UDF %s, because %s", functionName, e);
           logger.error(errorMessage);
           throw new UDFRegistrationException(errorMessage, e);
         }
       }
       
       registrationInformation.remove(functionName);
   ```




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org