This is an automated email from the ASF dual-hosted git repository.

freeoneplus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-mcp-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 6247d49  [bugfix]Release connection after executing query (#34)
6247d49 is described below

commit 6247d491924c74ed2afbd47618b2a5572a4234fc
Author: ivin <[email protected]>
AuthorDate: Tue Jul 29 14:05:44 2025 +0800

    [bugfix]Release connection after executing query (#34)
---
 doris_mcp_server/utils/query_executor.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/doris_mcp_server/utils/query_executor.py 
b/doris_mcp_server/utils/query_executor.py
index 46f8794..027ae06 100644
--- a/doris_mcp_server/utils/query_executor.py
+++ b/doris_mcp_server/utils/query_executor.py
@@ -432,21 +432,17 @@ class DorisQueryExecutor:
         )
 
         # Execute query
-        connection = await self.connection_manager.get_connection(
-            query_request.session_id
-        )
-
         # Set timeout if specified
         if query_request.timeout:
             try:
                 result = await asyncio.wait_for(
-                    connection.execute(optimized_sql, 
query_request.parameters, auth_context),
+                    
self.connection_manager.execute_query(query_request.session_id, optimized_sql, 
query_request.parameters, auth_context),
                     timeout=query_request.timeout
                 )
             except asyncio.TimeoutError:
                 raise Exception(f"Query timeout after {query_request.timeout} 
seconds")
         else:
-            result = await connection.execute(optimized_sql, 
query_request.parameters, auth_context)
+            result = await 
self.connection_manager.execute_query(query_request.session_id, optimized_sql, 
query_request.parameters, auth_context)
 
         return result
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to