Repository navigation
fix(session): open CloudFetch-disabled sessions on Real-Time warehouses - #456
Closed
vuanhphung wants to merge 3 commits into
Closed
vuanhphung wants to merge 3 commits into
vuanhphung wants to merge 3 commits into
Conversation
…ject can_cloud_download Since #436, a session with CloudFetch disabled sends can_cloud_download=false at CreateSession. Lakehouse Real-Time (Reyden) warehouses reject it with INVALID_CONF_VALUE, so use_cloud_fetch=False now fails at connect() there. When CreateSession rejects that setting, retry once without it and request INLINE results for the session, which is what 1.4.0 did. Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:14 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
Verdict: 1 Low
Looks good, with one low-severity test-coverage gap. The fallback only triggers when CloudFetch is disabled. On the retry, can_cloud_download is removed and the INLINE disposition is set before the second CreateSession is sent. Any other error still reaches the caller unchanged. The new wiremock test's body_string_contains mock with expect(1) checks that the retry body no longer carries can_cloud_download.
Only an HTTP 400 that names can_cloud_download (case-insensitive) switches the session to INLINE; other statuses and unrelated 400s do not. Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Error
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Inactive
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 19:48 — with
GitHub Actions
Error
…s error Fall back to INLINE only when the 400 rejects the can_cloud_download conf itself (INVALID_CONF_VALUE ... config "can_cloud_download"). If the retried CreateSession also fails, report both errors and leave the session's disposition unchanged. Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Error
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Inactive
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Error
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Error
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:17 — with
GitHub Actions
Error
vuanhphung
temporarily deployed
to
azure-prod
November 13, 2026 20:41 — with
GitHub Actions
Inactive
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:41 — with
GitHub Actions
Error
vuanhphung
had a problem deploying
to
azure-prod
November 13, 2026 20:41 — with
GitHub Actions
Error
This was referenced Nov 14, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What did you change, and why?
Since #436, a session with CloudFetch disabled sends
can_cloud_download=falseat CreateSession to get paged inline results. Lakehouse Real-Time (Reyden) warehouses reject that setting:So on those warehouses,
use_cloud_fetch=Falsein the Python connector now fails atconnect()with aProgrammingError. With 1.4.0 it worked, because the kernel requestedINLINEresults instead.Now, when CloudFetch is disabled and CreateSession rejects
can_cloud_download, the kernel retries CreateSession once without it and requestsINLINEresults for that session, as 1.4.0 did. Any other CreateSession error still surfaces unchanged.INLINEcarries the server's 25 MiB inline limit, so a larger result fails with "Inline byte limit exceeded", same as in 1.4.0. Warehouses that acceptcan_cloud_downloadkeep the paged inline behavior from #436.How do you know it works?
can_cloud_downloadfalls back toINLINE, and an unrelated CreateSession rejection still surfaces.cargo +stable fmt --all -- --checkandcargo clippy --all-targets -- -D warningspass.cargo test --no-fail-fastpasses: 1,311 passed, 64 ignored. One unrelated test,v0_metadata_wiremock::primary_keys_rejects_invalid_current_namespace_and_closes_lookup, is flaky onmaintoo (2 failures in 8 runs at db23442).mainplus a wheel built from this branch:connect(use_kernel=True, use_cloud_fetch=False)opens.main, the sameconnect()raisesINVALID_CONF_VALUE.Live benchmark (staging Large Reyden warehouse)
TPC-H Q6 on a Large Real-Time warehouse, 800 sessions (4 processes x 200 threads), cold start, each session querying back to back for 120 s, 16 client cores. Isolated A/B: only this change vs connector main 0c1b9e80 + kernel main db23442, both with use_cloud_fetch=False, 2 interleaved rounds, nothing else on the warehouse. Measured at 6333a2c. Median (min-max):
Kernel main fails all 800 connects with use_cloud_fetch=False on this warehouse (HTTP 400 INVALID_CONF_VALUE can_cloud_download); with this PR all sessions open and run.
This pull request and its description were written by Isaac.