Skip to content

Skip unused Python HTTP client for explicit kernel connections - #1017

Merged
aakash-saravanan-db merged 1 commit into
mainfrom
aakash-saravanan/skip-kernel-http-client
Nov 11, 2026
Merged

aakash-saravanan-db merged 1 commit into
mainfrom
aakash-saravanan/skip-kernel-http-client

Conversation

@aakash-saravanan-db

@aakash-saravanan-db aakash-saravanan-db commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • Bug Fix

Description

sql.connect(use_kernel=True) builds a Python HTTP client, including SSL setup, even though the Rust kernel uses its own transport.

Skip that unused client for explicit kernel connections and handle its absence during setup. Thrift, legacy SEA and automatic fallback keep their existing client.

In an HTTP-only benchmark with 800 concurrent connections, median connect time fell from 7.291 s to 3.369 s. This was a single-run comparison; warehouse warm/load effects were not isolated.

How is this tested?

  • Unit tests

  • 1,334 unit tests passed (four skipped), plus eight real-kernel tests covering connection lifecycle and sync/async result reads.

  • Mypy, Black and git diff --check pass.

Live TLS/proxy and external-cloud validation was not rerun.

Related Tickets & Documents

RE-17633

Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: 1 Low

Looks good, with one low concern. The kernel path no longer uses the Python HTTP client for anything: auth, feature flags and telemetry are already skipped there, and close(), the proxy telemetry and the Thrift→kernel recovery path all handle None correctly. The tests pin explicit, recovery and cached routes plus the Thrift/SEA controls well.

Comment thread src/databricks/sql/client.py Resolved
@aakash-saravanan-db
aakash-saravanan-db added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 1fee752 Nov 11, 2026
52 checks passed
@aakash-saravanan-db
aakash-saravanan-db deleted the aakash-saravanan/skip-kernel-http-client branch November 11, 2026 19:36

This branch was previously deployed

1 inactive deployment
azure-prod — 42f0c48c Deployed Nov 10, 2026 by peco-review-bot[bot] via followup #1445
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants