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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary: 
   
   AI scalar functions, EMBED and AI\_AGG recreate HTTP clients for each 
request sequence, losing connection reuse between batches and Blocks.
   
   This PR introduces `AIRequestExecutor` with exclusive client borrowing and a 
bounded idle cache. Scalar functions retain the cache in their execution 
contexts, while AI\_AGG shares it across local groups, flushes and resets.
   
   It also clears responses between attempts, detaches cancellation callbacks 
before returning clients, sets JSON headers for LOCAL providers without an API 
key, and fixes `max_retries` to count retries after the initial request.
   
   Unity compilation issues are fixed by adding missing protobuf and 
RuntimeState includes and locally suppressing CLucene conversion warnings, 
without changing CMakeLists.
   
   ### Release note
   
   AI functions reuse HTTP connections across batches and Blocks. 
`max_retries=0` performs one request; `max_retries=3` allows up to four attempts


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to