You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Thrift: a pooled session the server no longer knows no longer fails the
next statement (issue #14). When Databricks rejects ExecuteStatement on
an idle pooled session with INVALID_STATE: Invalid SessionHandle: ...
(HTTP 400; the statement never ran), arrowbricks used to drop the session
and raise. It now also discards the key's other idle sessions (they go
stale together) and retries the statement once on a newly opened pooled
session. Only a session taken from the idle pool is retried, only for that
error, and only once; any other rejection (bad SQL, auth, ...) still fails
on the first attempt.
What was and was not shown: the error is real and the fix works against the
real warehouse (closing the pooled session server-side makes 5.2.1 fail and
5.2.2 recover). The suspected trigger, a warehouse auto-stop, did not
invalidate sessions on the serverless Pro warehouse we tested (409 s idle
until auto-stop, 60 s more stopped, then the old session worked), so this
is a defensive fix for whatever does invalidate a session (session expiry,
an administrator or another client closing it, other warehouse types),
not a confirmed cure for the auto-stop report.