Skip to content

fix(kernel): evict invalid sessions and reject reuse - #595

Open
vuanhphung wants to merge 2 commits into
mainfrom
fix/kernel-evict-expired-session
Open

vuanhphung wants to merge 2 commits into
mainfrom
fix/kernel-evict-expired-session

Conversation

@vuanhphung

@vuanhphung vuanhphung commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

SEA reports unusable sessions as either 404 Session does not exist or 400 Invalid SessionHandle. Recognize both while preserving unrelated NotFound and InvalidArgument errors.

Return the original error for the request that discovers the dead session to prevent automatic replay. Reject later execution on an invalid session with ErrBadConn before calling the kernel, so pinned *sql.Conn instances are retired too.

Validation: full pure-Go and kernel-tagged test suites pass. Regression tests use a local SEA endpoint to verify both response shapes, no replay of the failed statement, and no additional statement requests from pinned connections. Standard lint and tagged lint for changed code pass; two pre-existing unchecked r.Close() calls remain in rows.go.

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>

@oss-reviewer-bot oss-reviewer-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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
@vuanhphung vuanhphung changed the title fix(kernel): evict connections for missing sessions fix(kernel): evict invalid sessions and reject reuse Nov 24, 2026

@oss-reviewer-bot oss-reviewer-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.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

✅ No issues identified.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant