barking-code opened a new pull request, #3357: URL: https://github.com/apache/iceberg-python/pull/3357
Related: #1744, #1747, #1941 # Rationale for this change #1747 / #1941 caught the `TSaslClientTransport` reopen failure on the client side, but the doomed `open()` attempt still completes a TCP handshake before aborting, which leaves a `TTransportException` event in the HMS server log per `_HiveClient` re-entry. In production this produces a steady stream of server-side error events matched by HMS alert filters. `TSaslClientTransport` is single-use by design (its `SASLClient` is disposed on `close()` and has no reset). Reusing it across context-manager entries was the original misuse. This PR makes the transport single-use: `_HiveClient.__init__` no longer creates a transport, `__enter__` creates and opens a fresh one, `__exit__` closes it. The `try/except` retry from #1747 / #1941 is removed because the failure it protected against cannot occur on a fresh transport. `_HiveClient` itself stays long-lived, so `HiveCatalog` callers see no behaviour change. # Are these changes tested? - New unit test asserts that the transport instance differs between two consecutive context-manager entries - Existing `test_create_hive_client_with_kerberos_using_context_manager` continues to pass - Empirical verification against a Kerberized HMS (Hive 3.1.0): before → 29 server-side `TTransportException` events per 30 re-entries, after → 0 # Are there any user-facing changes? No. -- 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]
