jiangxt2 opened a new issue, #14359:
URL: https://github.com/apache/gravitino/issues/14359

   ### What would you like to be improved?
   
   The Python client's `HTTPClient` creates a new urllib opener for each 
request and does not maintain an SDK-managed reusable connection pool. 
Applications making repeated metadata calls cannot configure connection reuse 
or pool limits through the client.
   
   Unity Catalog OSS reuses an `aiohttp.ClientSession` with a `TCPConnector` 
and provides explicit cleanup. Its connection ownership and lifecycle design 
provides a useful reference while retaining Gravitino's synchronous public API. 
[UC 
implementation](https://github.com/unitycatalog/unitycatalog/blob/35df64c579b94990d8d315e8d804b265f0a4ee58/clients/python/build/templates/asyncio/rest.mustache)
   
   ### How should we improve?
   
   - Reuse HTTP connections across calls through the same client transport, 
with bounded and configurable pool limits.
   - Define transport ownership and sharing between the public client and 
objects loaded through it.
   - Release owned connection resources predictably, preserving existing 
repeated-close behavior.
   - Preserve request-local headers, authentication handling, timeout settings, 
and domain exceptions when connections are reused.
   - Add HTTP-level regression coverage for actual keep-alive connection reuse, 
pool limits, request isolation, and cleanup.
   
   Retry policy, token renewal, and native asynchronous APIs remain separate 
work.
   
   Parent epic: #14334.
   


-- 
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]

Reply via email to