Skip to content

feat(kernel): forward request timeout - #457

Open
vuanhphung wants to merge 8 commits into
mainfrom
vu-phung/forward-kernel-request-timeout
Open

feat(kernel): forward request timeout#457
vuanhphung wants to merge 8 commits into
mainfrom
vu-phung/forward-kernel-request-timeout

Conversation

@vuanhphung

Copy link
Copy Markdown
Collaborator

Forward the driver's existing ClientTimeout to the kernel request-timeout C ABI introduced in databricks/databricks-sql-kernel#288. Durations are converted to milliseconds, positive sub-millisecond values round up, and zero selects the kernel's 120-second default.

The kernel pin and connection telemetry are updated. Both the normal and cgo kernel test suites pass, and golangci-lint reports no issues.


This PR was created with GitHub MCP.

@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 — clean, well-tested forwarding of ClientTimeout to the kernel request-timeout ABI, with 1 low telemetry note. Conversion logic (round-up sub-ms, 0 → kernel default) is correct and unit-covered; doc/telemetry updates are accurate.

Comment thread kernel_telemetry.go Outdated

@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 — a clean, correct, and well-tested change that forwards ClientTimeout to the kernel request-timeout setter, with sensible zero/sub-millisecond handling and matching telemetry. Only one low doc-wording nit: doc.go describes the 900s value as if fixed when it is merely the default.

Comment thread doc.go Outdated

@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 — a clean, well-tested change that forwards ClientTimeout to the kernel request-timeout C ABI. Conversion logic (zero → kernel default, sub-ms → 1, floor for ≥1ms) is covered by unit tests, and the telemetry SocketTimeout value is consistent with the value forwarded. One low note: the 120_000 default is duplicated from the kernel and could drift.

Comment thread internal/backend/kernel/config.go Outdated

@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 — a clean, well-tested forwarding of ClientTimeout to the kernel request-timeout C ABI, with sensible zero/sub-ms handling and matching unit/telemetry tests. One low-confidence note about the telemetry socket_timeout field's unit convention (posted inline).

Comment thread kernel_telemetry.go Outdated

@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 — a focused, well-tested change forwarding ClientTimeout to the kernel request-timeout C ABI plus telemetry. Verified the doc/default (900s), the direct C setter call, and OpenSession ordering; one low note about inconsistent sub-second rounding between the two conversion helpers.

Comment thread kernel_telemetry.go

@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.

✅ No issues identified by the review bot.

@eric-wang-1990

Copy link
Copy Markdown
Contributor

Do you need to update the CONNECTION_PARAMETER file to reflect the new change?

@vuanhphung

Copy link
Copy Markdown
Collaborator Author

Updated CONNECTION_PARAMETERS.md in c53cbb4 to document that kernel requests inherit the internal ClientTimeout (900s by default), that zero keeps the kernel's 120s default, and that there is currently no DSN/WithX option for it.


This comment was generated with GitHub MCP.

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
@vuanhphung
vuanhphung force-pushed the vu-phung/forward-kernel-request-timeout branch from c53cbb4 to 6abc305 Compare August 26, 2026 05:05

@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.

✅ No issues identified by the review bot.

Comment thread CONNECTION_PARAMETERS.md
Comment thread CONNECTION_PARAMETERS.md Outdated
@vuanhphung

Copy link
Copy Markdown
Collaborator Author

@eric-wang-1990 removed from the md doc again, PTAL!

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
@vuanhphung
vuanhphung force-pushed the vu-phung/forward-kernel-request-timeout branch from 17ecf78 to 54d7756 Compare August 26, 2026 16:32

@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.

✅ No issues identified by the review bot.

@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.

✅ No issues identified by the review bot.

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.

2 participants