zhangm365 opened a new pull request, #40721:
URL: https://github.com/apache/doris/pull/40721

   ## Proposed changes
   
   The process of `createCatalog` should be:
   
   1. First, check if `catalogName` exists;
   2. If it exists, directly throw a prompt error message;
   3. If it does not exist, proceed with the process of creating the catalog.
   
   <!--Describe your changes.-->
   
   **Previous process:**
   1. First, the catalog is directly created;
   2. Then, `catalogName` is checked for existence.
   
   **Problem:** This logic will result in multiple catalogs being created when 
the `create catalog` statement is executed multiple times, and it will not 
prompt an error message indicating that the catalog has already been created.
   
   **Outcome:** The `createFromStmt` method will instantiate a new object, 
which may lead to a memory leak.
   


-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to