Skip to content

Run Volume PUT, GET and REMOVE through the kernel backend - #560

Open
aakash-saravanan-db wants to merge 4 commits into
mainfrom
aakash-saravanan_data/feat/volume-restart-20261113
Open

aakash-saravanan-db wants to merge 4 commits into
mainfrom
aakash-saravanan_data/feat/volume-restart-20261113

Conversation

@aakash-saravanan-db

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

Copy link
Copy Markdown
Collaborator

Feature or gap

With the kernel backend, the driver refuses SQL PUT, GET and REMOVE on a Unity Catalog Volume, because the kernel returned the instruction row and moved no file.

What this PR addresses

The kernel now runs a Volume transfer inside execute (databricks/databricks-sql-kernel#520, #521). When the context carries staging paths (driverctx.NewContextWithStagingInfo), the kernel backend sets them as the Volume options on the statement before it runs:

  • ExecContext transfers the file and reports zero rows affected. Cancelling the context stops a running transfer.
  • Without staging paths, ExecContext fails a Volume statement with "staging ctx must be provided." and QueryContext returns its instruction row, as on Thrift.
  • REMOVE of a missing object succeeds, as on Go Thrift.
  • Kernel errors keep the Volume error code (KernelError.ErrorCode), and a local file error unwraps to its *os.PathError. Storage errors do not evict the connection.
  • ClientTimeout is the transfer's idle limit; a context deadline bounds the whole transfer.
  • New GET files are created with mode 0666 before the umask, as in the Python and Node Thrift drivers; Go Thrift uses 0644.

The guard that refused staging statements on the kernel backend is removed. KERNEL_REV and the copied C header move to databricks/databricks-sql-kernel#521.

Dependencies

Users get the change only after a kernel release that includes #520 and #521, with the matching versions and sums of the native modules in go.mod. KERNEL_REV selects the source for local and CI builds only.

Tests and validation

  • go test ./... (pure Go) passes.
  • With the kernel archive built from KERNEL_REV, go test -tags databricks_kernel passes for the root package and internal/backend/.... TestKernelVolumeTransfer runs PUT, GET and REMOVE against a local TLS server, covering storage errors, a missing local file, a path outside the staging roots, an in-flight cancel, __input_stream__ and a missing staging context.

This pull request and its description were written by Isaac.

@aakash-saravanan-db aakash-saravanan-db added the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 2026
@github-actions

Copy link
Copy Markdown

Go integration tests triggered (sea / passthrough). View workflow runs.

@aakash-saravanan-db
aakash-saravanan-db marked this pull request as ready for review November 14, 2026 02:18

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

Verdict: 1 Low · 1 Nit

Mostly sound, with two low-severity items. The native staging dispatch, cancellation watcher, and defer teardown order look correct. REMOVE not-found=success matches Thrift's 404 handling. The kernel-side behavior depends on the pinned kernel revision, which isn't in this checkout, so I couldn't check it here. Nit: the error strings "Volume transfer: ..." and "Volume operation requires..." start with a capital letter, which is against Go convention (staticcheck ST1005).

Other findings

  • ⚪ Nit — nativeStagingStub has an err field, but no table case ever sets it. The dispatch path that wraps a CompleteStaging failure in NewDriverError(..., "error performing staging operation", err) is never tested. No test checks that the returned error is non-nil in that case, or that the cause can still be reached with errors.Is/errors.As (e.g. context.Canceled, *os.PathError). That cause chain is the point of the new KernelError.Unwrap and the ctx-wrapping in CompleteStaging. A case with err: context.Canceled that asserts errors.Is(err, context.Canceled) would cover it.

Comment thread internal/backend/kernel/operation.go Resolved
@github-actions github-actions Bot removed the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 2026
@github-actions

Copy link
Copy Markdown

Integration test approval reset.

New commits were pushed to this PR. Label(s) integration-test-kernel were removed for security.

A maintainer must re-review and re-add a label to preview tests again. (The real gate runs in the merge queue.)

Latest commit: 26f142a

@aakash-saravanan-db aakash-saravanan-db added the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 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.

Verdict: 1 Medium · 2 Low

The dispatch is mostly sound, with one medium lint concern in the new kernel CompleteStaging path. ExecContext now routes kernel Volume operations to native completion, and Thrift keeps its existing row-based path. The rest are low-severity issues: missing session-fatal eviction and thin test coverage.

Comment thread internal/backend/kernel/operation.go Resolved
Comment thread internal/backend/kernel/operation.go Resolved
Comment thread connection_test.go Resolved
@github-actions

Copy link
Copy Markdown

Go integration tests triggered (sea / passthrough). View workflow runs.

@github-actions github-actions Bot removed the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 2026
@github-actions

Copy link
Copy Markdown

Integration test approval reset.

New commits were pushed to this PR. Label(s) integration-test-kernel were removed for security.

A maintainer must re-review and re-add a label to preview tests again. (The real gate runs in the merge queue.)

Latest commit: f0c6f41

@aakash-saravanan-db aakash-saravanan-db added the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 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.

Verdict: 1 Medium · 1 Nit

Mostly sound. One medium issue: when native staging completion fails with a session-fatal error, the session is not marked dead, unlike every other kernel result path. Kernel-side test coverage for the new paths is also thin. Nit: the new CHANGELOG entry is followed by a stray blank line inside the bullet list.

Other findings

  • ⚪ Nit — None of the new kernel-side behaviour has unit coverage. Untested paths:
  • kernelOp.IsStaging with a nil exec.
  • The CompleteStaging outcome mapping (outcome != 2 returns an error).
  • Wrapping of the cancelled-context error.
  • The new KernelError.Unwrap / cause path, where errors.Is(err, fs.ErrNotExist) should work through a *KernelError carrying an os.PathError.

The only new test (TestConnNativeStagingDispatch) uses a Go stub at the conn layer. The removed TestExecuteRejectsStaging has no replacement, and driver_e2e_test.go has no kernel staging test. Unwrap could be pinned in the non-cgo errors_classify_test.go. kernel_test.go could cover IsStaging with a nil exec and the outcome mapping.

Comment thread internal/backend/kernel/operation.go Resolved
@github-actions

Copy link
Copy Markdown

Go integration tests triggered (sea / passthrough). View workflow runs.

@github-actions github-actions Bot removed the integration-test-kernel Preview the full passthrough kernel integration suite (live warehouse) label Nov 14, 2026
@github-actions

Copy link
Copy Markdown

Integration test approval reset.

New commits were pushed to this PR. Label(s) integration-test-kernel were removed for security.

A maintainer must re-review and re-add a label to preview tests again. (The real gate runs in the merge queue.)

Latest commit: 3629843

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

Verdict: 1 Medium · 2 Low

The PR looks correct overall. There is one medium concern: CompleteStaging skips evicting a dead session when a session-fatal error races context cancellation, which execute() deliberately avoids. There are also two low gaps: no eviction on stream-acquisition failure, and no test for the cancellation path.

Comment thread internal/backend/kernel/operation.go Resolved
Comment thread internal/backend/kernel/operation.go Resolved
Comment thread staging_kernel_test.go Resolved

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

Verdict: 2 Low

The dispatch and cancellation design look sound, with two low-severity concerns: two early-failure paths in CompleteStaging skip session-fatal eviction, and the native path drops two telemetry tags. As the PR description already says, the pinned KERNEL_REV and header point at an unmerged kernel commit and need exports that the published binding modules don't have, so databricks_kernel-tagged builds against published bindings will fail to link until those modules and the module/sum updates ship.

Comment thread internal/backend/kernel/operation.go Resolved
Comment thread connection.go Resolved

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

Verdict: 1 Medium · 1 Low · 1 Nit

Mostly solid, with one medium gap: the session-fatal eviction this PR adds is skipped on the early get_result_stream failure path in CompleteStaging. Also worth noting for release: KERNEL_REV pins an unmerged kernel PR commit, and the new C symbols need a kernel release later than 1.4.0 before this can ship. The cancellation test relies on the exact number of ctx.Err() calls (errCalls == 2), which is fragile (nit).

Other findings

  • 🔵 Low — Removing the isStagingStatement pre-check means staging detection now relies only on the server manifest's is_volume_operation flag, reported through kernel_executed_statement_is_volume_operation. If a warehouse or result shape leaves that flag out (or the kernel misses it), IsStaging returns false, and ExecContext on a PUT/GET reports success with 0 rows while no file moves. That is the silent-data-loss case the removed guard existed to block. Consider keeping the SQL-text detector as a fallback: if the text looks like PUT/GET/REMOVE but the operation is not marked, return an error instead of success. Alternatively, record that the server is guaranteed to always set the flag.
  • ⚪ Nit — The native branch returns before the telemetryUpdate callback is wired, so kernel Volume transfers never set TagChunkCount / TagBytesDownloaded. The Thrift staging path does set them. This is a minor telemetry gap compared with Thrift. If the C ABI can't report byte counts, a short comment noting the omission would help.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low · 2 Nit

Mostly sound, with 3 low concerns: the session-eviction policy is applied inconsistently on the early error paths of CompleteStaging, one error message is misleading for status 0, and the new cancellation watcher has no test. Follow-up outside this PR: per the description, the published 1.4.0 binding archives lack the new kernel_get_last_error_* and volume exports, so a -tags databricks_kernel build against the published bindings will fail to link until a matching bindings release ships.

Other findings

  • ⚪ Nit — The outcome != 2 branch handles two different cases: status 0 ("ordinary result": the stream turned out not to be a Volume operation) and status 1 ("input bytes required"). Both get the same error, volume operation requires a local file instruction, and that message only makes sense for status 1. A status-0 result after IsStaging returned true points to a kernel or server inconsistency, and this message would send whoever debugs it in the wrong direction. Neither case is tested. staging_kernel_test.go only covers error returns from completion, and TestConnNativeStagingDispatch stubs out CompleteStaging. Consider using a distinct message for each status (including the numeric status helps) and adding a test for it.
  • ⚪ Nit — The *Cancelled subtests do not exercise the cancellation path this PR adds. cancelOnCompletionErrorContext cancels on the second Err() call, which comes after kernel_result_stream_complete_volume_operation has already returned an error. So the watcher goroutine never calls kernel_result_stream_canceller_cancel while a transfer is running. These cases only check how the error is wrapped after the fact. They also depend on how many times CompleteStaging happens to call ctx.Err(), so adding or removing one check would silently change what they test. A test that cancels while the storage request is in flight (for example, a handler that blocks until the ctx is cancelled) would cover the documented promise that "context cancellation" interrupts the transfer.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low · 1 Nit

Looks good overall, with 2 low concerns: some kernel CompleteStaging setup failures skip the session-eviction policy, and nothing tests that cancellation actually interrupts an in-flight transfer. Follow-up (not caused by this PR): the native path doesn't emit the chunk-count/bytes telemetry tags that the Thrift staging path does.

Other findings

  • ⚪ Nit — Nothing tests the result-stream canceller watcher (case <-ctx.Done(): C.kernel_result_stream_canceller_cancel(canceller)). The two *Cancelled subtests in staging_kernel_test.go cancel the context from inside Err() only after native completion has already returned. They exercise the error-wrapping branch, not an interrupt of an in-flight transfer. If the watcher were dropped or never fired, a cancelled ExecContext would block until the storage transfer finished and every test would still pass. Consider adding a case where the /object handler blocks until the request context is cancelled, then assert that ExecContext returns context.Canceled promptly.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low

Looks good overall, with one low concern. Native Volume completion now goes through CompleteStaging. The canceller and deferred cleanup run in the correct LIFO order, and storage failures leave the session valid. When the instruction stream fails to open, CompleteStaging doesn't apply the session-eviction policy that Results applies to the same call. Nit: the VOLUME_STORAGE_* error-code strings are inline literals and could be named constants.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Medium

Looks mostly correct, with 1 medium issue: the new CompleteStaging doesn't evict a dead session when getting the result stream or the canceller fails. Otherwise the dispatch, cancellation wiring, defer ordering, and the storage-vs-instruction eviction split look right. Follow-up: the native path no longer emits the chunk-count and bytes-downloaded telemetry tags that the Thrift staging path records.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low

The change looks sound, with one low-severity concern: the kernel example still describes staging as rejected on the kernel backend. CompleteStaging cleans up in a safe order (stops the watcher goroutine, then frees the canceller, then closes the stream). It only evicts the session for non-storage failures, and it never returns ErrBadConn. Nits: the cancellation test depends on the exact number of ctx.Err() calls (errCalls==2), so a harmless refactor could break it. The native completion path also skips the chunk-count/bytes telemetry tags that the Thrift staging path records.

Other findings

  • 🔵 Low — This PR removes the up-front staging rejection from Execute, but examples/kernel/main.go still says staging is "rejected at execute". It also runs a real PUT '/tmp/local.csv' INTO '/Volumes/main/default/vol/f.csv' OVERWRITE and expects ErrNotSupportedByKernel.

After this change, that statement goes to the server. With no staging context set, it fails with "staging ctx must be provided." instead of the documented rejection. If someone copies the example and adds staging roots, the PUT really runs and overwrites the Volume file. The example and its comment should be updated or the staging block removed, along with the doc.go/CHANGELOG edits.

@aakash-saravanan-db

Copy link
Copy Markdown
Collaborator Author

The obsolete staging-rejection example is removed in 6218f29. The example retains backend selection, connection handling and SELECT; it no longer submits the hard-coded PUT. go test ./examples/kernel compiles successfully without executing remote actions.

The cancellation fault-injection test's dependence on the ctx.Err() boundary remains an acknowledged maintenance tradeoff; it checks the real post-completion cancellation/session-error race. The native path's missing Thrift chunk/byte telemetry tags remain an optional observability limitation, with no telemetry-parity claim.

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

Verdict: 1 Low

Looks mostly good, with one low concern. Native completion goes through ExecContext cleanly, and the storage-vs-instruction eviction split is tested against the real native library, including races with cancellation. Possible follow-up: the native staging path no longer records chunk/byte telemetry tags the way the Results-based path did.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Medium

Looks good overall, with one medium gap. On two early setup failures in CompleteStaging, the session-fatal eviction that Results() applies is skipped. Not blocking but worth a follow-up: the native path drops the chunk/bytes telemetry tags that the Thrift staging path sets, and no tagged test covers a successful native completion or the outcome != 2 branch.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low

Looks good overall. I found one low-severity gap: the early error paths in CompleteStaging skip the session-eviction policy. The dispatch, cancellation teardown order, ErrBadConn avoidance and REMOVE-404 parity with Thrift all check out. A possible follow-up: the native path records no chunk/bytes telemetry tags, while the Thrift staging path does.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low

Looks good overall, with one low concern: CompleteStaging doesn't apply the fatal-session eviction when it fails to get the result stream or create the canceller. The dispatch in execStagingOperation, the cancellation wrapping and the storage-vs-instruction eviction split look correct. The new error-code values (VOLUME_STORAGE_HTTP_ERROR and the others) are typed in as string literals; named constants would be a nice touch (nit).

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 Low

Looks good overall, with one low-severity gap. When opening the result stream or its canceller fails inside CompleteStaging, the session is not evicted, unlike in Results. As a nit, the native path no longer adds the chunk-count/bytes telemetry tags that the Thrift staging path adds, which could be follow-up work.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 High

Looks good — no blocking issues in the changed code. Before merge, as the PR notes: the new C symbols need released bindings pins in go.mod/go.sum (bumping KERNEL_REV alone won't link), plus a clean-install check. Native ExecContext staging also skips the Thrift path's chunk telemetry tags; that can be a follow-up.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The cgo shim now calls new kernel ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation), but go.mod still pins the published bindings at v1.5.0. Only the source-built KERNEL_REV changes, so consumers using the default prebuilt archives may fail to link. Bump all platform bindings pins and go.sum to a release that exports these symbols.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Duplicate of the release gate in #560 (comment). The v1.5.0 bindings archives lack these symbols, so the seven bindings modules in go.mod and go.sum move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, as the Kernel version section of the description states.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 16adbcd: go.mod:63-69 pins all seven bindings at v1.5.0, which lacks these symbols; this stays a merge blocker.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: go.mod:63-69 still pins all seven bindings at v1.5.0; this blocks merge until the kernel release lands and the pins move to it.

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

Verdict: 1 High

Looks good — no blocking issues in the dispatch, cancellation join order, error-chain or eviction logic. Merge still depends on published native bindings pins in go.mod/go.sum for the new ABI symbols, since KERNEL_REV alone doesn't ship them, as the PR states.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The PR calls new kernel C ABI symbols (kernel_result_stream_complete_volume_operation, kernel_get_last_error_code and others) and bumps KERNEL_REV. go.mod and go.sum still pin the published v1.5.0 bindings, so installed-driver builds may fail to link. Bump all platform bindings pins to a release that exports these symbols, or split the change.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Duplicate of the release gate in #560 (comment). The v1.5.0 bindings archives lack these symbols, so the seven bindings modules in go.mod and go.sum move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, as the Kernel version section of the description states.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 16adbcd: all seven bindings modules are still pinned to v1.5.0 (go.mod:63-69), and that release lacks these symbols.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: go.mod:63-69 still pins all seven bindings modules to v1.5.0, which lacks the new symbols; merge blocker.

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

Verdict: 1 High · 1 Low

Looks good, no blocking issues in the diff. Dispatch, cancellation, error unwrapping and eviction logic check out against connection.go. Still a merge prerequisite: KERNEL_REV adds new ABI symbols, but go.mod/go.sum still need the released kernel bindings, as the PR description says.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Comment thread staging_kernel_test.go Resolved
Comment thread internal/backend/kernel/operation.go Outdated
var outcome C.KernelVolumeCompletion
err := call(func() C.KernelStatusCode {
// Go Thrift REMOVE treats a missing object as success.
return C.kernel_result_stream_complete_volume_operation(stream, paths.c, true, &outcome)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The new cgo calls (kernel_result_stream_complete_volume_operation, kernel_get_last_error_code) need a newer kernel ABI, but go.mod still pins the published bindings at v1.5.0. Only KERNEL_REV changed. A default build against the published bindings may fail to link. Bump all platform modules and go.sum to a release that exports these symbols, then verify a clean build.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Duplicate of the release gate in #560 (comment). The v1.5.0 bindings archives lack these symbols, so the seven bindings modules in go.mod and go.sum move to the first kernel release that includes databricks-sql-kernel#512 and databricks-sql-kernel#513 before merge, as the Kernel version section of the description states.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 16adbcd: go.mod:63-69 still pins all seven bindings modules at v1.5.0. They need a bump before merge.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: go.mod:63-69 still pin all seven bindings modules at v1.5.0. This stays blocked until a kernel release ships.

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

Verdict: 1 High

Looks good — no inline findings. Dispatch, cancellation-watcher join ordering, error-chain preservation and storage-vs-session eviction look correct. Merge still depends on pinning the released native bindings in go.mod/go.sum; KERNEL_REV alone won't ship the new ABI symbols, as the description notes.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The PR calls new kernel ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation) unconditionally, but go.mod still pins every platform bindings module at v1.5.0. The repo's own lessons (L-0030) say a KERNEL_REV bump alone isn't enough. Bump the go.mod/go.sum pins to a bindings release that exports these symbols, or gate the change on that release.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: cgo.go:183 calls new symbols, but the go.mod bindings pins are still v1.5.0. Waiting on the kernel release.

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

Verdict: 1 High

Looks good — no blocking defects found in the dispatch, cancellation watcher, error-chain or eviction logic. Merge still depends on the bindings go.mod/go.sum pin that the description already flags: KERNEL_REV alone won't link the new ABI symbols.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The change calls new C symbols such as kernel_get_last_error_code and kernel_result_stream_complete_volume_operation, and it bumps KERNEL_REV. go.mod still pins every kernel-bindings platform module at v1.5.0, which predates these symbols. Tagged builds that link the published modules (not make kernel-lib) will probably fail to link or fail at runtime. Bump the per-platform module versions and go.sum to the matching bindings release, then check a tagged build against the installed modules.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: go.mod still pins kernel-bindings v1.5.0, which lacks kernel_get_last_error_code (cgo.go:183). Bump the pins once the bindings release ships.

@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch 2 times, most recently from 5d8b494 to aba076a Compare December 2, 2026 03:02

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

Verdict: 1 High · 1 Low

The dispatch, cancellation and error-classification logic looks right; one high merge blocker remains. The C ABI calls need a released kernel-bindings pin, and KERNEL_REV alone does not ship that.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Comment thread KERNEL_REV Resolved
Comment thread staging_kernel_test.go Resolved
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from aba076a to dab5b95 Compare December 2, 2026 04:08

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

Verdict: 1 High · 1 Low

Looks good, with 1 low concern. Dispatch, cancellation and error classification look correct. Merge is still blocked on publishing the bindings: the new ABI symbols need released bindings module versions and sums in go.mod/go.sum. KERNEL_REV alone does not ship them, as the PR description notes.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • 🟠 High — The new ABI calls require the coordinated native release, but shipped bindings remain pinned to v1.5.0; changing KERNEL_REV only updates source builds and does not supply compatible archives to installed-driver consumers. Before merging, update every platform module and checksum to the compatible release and validate a clean tagged consumer build without local linker overrides. (Found by GPT-6.1 Sol · the judge couldn't confirm it)

Comment thread internal/backend/kernel/operation.go Resolved
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from dab5b95 to 903e3bf Compare December 2, 2026 04:25

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

Verdict: 1 High · 1 Low

Looks good, with 1 low concern. As the PR description says, the bindings versions and sums in go.mod/go.sum still need updating for the new ABI symbols before merge. Bumping KERNEL_REV alone won't ship them.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The shim now calls new ABI symbols (kernel_get_last_error_code, kernel_result_stream_complete_volume_operation, etc.), but go.mod still pins every bindings module at v1.5.0. KERNEL_REV only affects source-built archives, so installed-driver kernel builds may not link. Bump the platform bindings pins and go.sum to a release that exports these symbols, or gate the merge on that release.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocked on the kernel release, so I'm leaving this open: the cgo calls need databricks/databricks-sql-kernel#520 and #521 merged and a bindings release that includes them, and the go.mod bindings pins move to that release before this merges. KERNEL_REV already pins the #521 head for source builds.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at b884e82: go.mod:63-69 still pin all bindings at v1.5.0; waiting on the kernel #520/#521 release.

Comment thread internal/backend/kernel/operation.go Resolved

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

Verdict: 1 High · 1 Nit

Looks good, no blocking defects. The dispatch, cancellation watcher, defer ordering, eviction exemptions and error chain check out. Before merge, the released kernel bindings still need pinning in go.mod/go.sum and a clean-install check; the PR already lists both as prerequisites, since KERNEL_REV alone doesn't ship the new ABI symbols.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • ⚪ Nit — The header sync also adds kernel_session_config_set_tls_certificate_revocation, which this PR doesn't use. Leaving it out would keep this ABI change limited to the Volume work and easier to bisect. (Found by Claude Opus 5.5 · the judge disputed it but couldn't back that up, so it's kept)

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — cgo.go now calls kernel_get_last_error_code and the Volume completion symbols. go.mod still pins the published bindings modules at v1.5.0, and the diff only bumps KERNEL_REV. Default (non-source-built) kernel builds may fail to link. Bump every platform module and go.sum to a bindings release that exports these symbols, then check a clean consumer build.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4d71e38: go.mod:63-69 pins all bindings modules at v1.5.0; bump them and go.sum once the bindings release ships.

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

Verdict: 1 High · 1 Low

Looks good: I found no defects in the diff. The one open merge prerequisite, already noted in the PR, is that lastError now calls new ABI symbols on every kernel build. The bindings module pins in go.mod/go.sum must move to a compatible released kernel before merge, because a KERNEL_REV bump alone will not link.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Comment thread staging_kernel_test.go Resolved
if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The code now calls new kernel C ABI symbols (kernel_result_stream_complete_volume_operation, kernel_get_last_error_code and others), but go.mod and go.sum still pin the published bindings at v1.5.0, which lack them. Tagged builds from installed consumers will therefore fail to link. Publish the matching bindings release, bump all platform pins and sums, and verify a clean build.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4d71e38: go.mod/go.sum still pin bindings v1.5.0, which lack the new ABI symbols; this is blocked until a bindings release ships.

@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from 5e3d4e8 to 25ffb36 Compare December 2, 2026 06:59

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

Verdict: 1 High · 1 Low

Looks good — 1 low concern. The native dispatch, cancellation watcher join order, and storage-versus-session eviction classification check out. Merge still waits on the released kernel bindings pins in go.mod/go.sum; the PR already notes this.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • 🟠 High — The new ABI calls still link against unchanged v1.5.0 bindings, although this PR requires a coordinated native release that has not been selected; KERNEL_REV only changes source-build selection, not the archives downstream users link. Update all platform module versions and checksums to the compatible release and validate a clean installed-driver tagged build before merging. (Found by GPT-6.1 Sol · the judge couldn't confirm it)

Comment thread staging_kernel_test.go Resolved
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from 25ffb36 to 7a4e8d7 Compare December 2, 2026 07:36

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

Verdict: 1 High

Not mergeable yet: 1 high concern. The bindings module pins have not been bumped for the new ABI symbols. The ExecContext dispatch, the cancellation watcher and the error-chain and eviction classification look correct. Follow-up: add a live kernel Volume E2E test and register it in the nightly filters.

Comment thread KERNEL_REV Resolved
With staging paths on the context, the kernel backend sets the Volume
options on the statement before it runs, so the kernel transfers the
file of a PUT, GET or REMOVE inside execute. Without them, ExecContext
fails a Volume statement and QueryContext returns its instruction row,
as on Thrift. Kernel errors keep the Volume error code, and a local file
error unwraps to its os.PathError. Removes the guard that refused staging
statements on the kernel backend.

Pins KERNEL_REV to databricks-sql-kernel#521 and copies its header.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from 7a4e8d7 to e4a73e0 Compare December 3, 2026 06:38
@aakash-saravanan-db aakash-saravanan-db changed the title Complete native Volume transfers for ExecContext Run Volume PUT, GET and REMOVE through the kernel backend Dec 3, 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).

Verdict: 1 High

Needs changes: 1 high concern. The Volume PUT/GET/REMOVE wiring, the error classification and the tests look correct. The new ABI calls, though, need released bindings pinned in go.mod, not only a KERNEL_REV bump. Nit: in lastError, the local code shadows the code parameter.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The new C symbols (kernel_get_last_error_code, kernel_statement_set_volume_options) are only in the newer kernel, but go.mod still pins the bindings at v1.5.0, so a databricks_kernel build that uses the published archives can't link. Bump the bindings modules and go.sum to a release that has these APIs before releasing. Source builds through KERNEL_REV and the Makefile are unaffected.

🔀 Found by both reviewers · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4d71e38: go.mod:63-69 still pin the bindings at v1.5.0, so this release gate remains outstanding.

Pin the kernel to d18b044b, the databricks-sql-kernel main commit that
merged #521 (Volume bindings, on #520). The bindings tree matches the
commit this PR pinned before, plus #511 (configurable Arrow LZ4
compression) from kernel main. The copied C header is updated to match.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@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).

Verdict: 1 High · 1 Medium · 1 Low

Needs changes: 1 high and 1 low concern. The wiring and error classification look right, but the new native ABI symbols are not in the bindings version go.mod links (v1.5.0), so default kernel builds would fail to link.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Comment thread staging_kernel_test.go Resolved
Comment thread staging_kernel_test.go Resolved
if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The shim now calls new kernel symbols (kernel_get_last_error_code, kernel_statement_set_volume_options, kernel_executed_statement_is_volume_operation), but go.mod and go.sum still pin bindings v1.5.0. Only KERNEL_REV changed, so default tagged builds will likely fail to link. Publish the matching bindings release and bump every platform module in go.mod and go.sum.

🔀 Found by both reviewers · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 4d71e38: go.mod:63-69 pins all bindings at v1.5.0; bump them and go.sum after the bindings release.

TestKernelVolumeTransfer now checks that a PUT sends the local file's
bytes to storage, that QueryContext runs the transfer with the staging
context and returns the instruction row either way, and that the in-flight
cancel goroutine exits with the test context.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@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).

Verdict: 1 High · 1 Low

Needs changes: 1 high, 1 low. The kernel staging wiring and error classification look right, but the new ABI symbols need the bindings bumped in go.mod. Nit: CHANGELOG does not mention the 0666 vs 0644 GET file mode difference that doc.go documents.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The shim calls new C symbols (kernel_get_last_error_code, kernel_statement_set_volume_options, kernel_executed_statement_is_volume_operation), but go.mod/go.sum still pin bindings v1.5.0 on every platform, so a tagged build may fail to link. Bump all platform bindings pins and sums to a release exporting these symbols, as the repo's own learning log requires.

🔀 Found by both reviewers · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at efc80cd: go.mod and go.sum still pin bindings v1.5.0. They need to move to the bindings release that exports these symbols.

Comment thread internal/backend/kernel/operation.go Resolved
… fails

Matches the other statement setters.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@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).

Verdict: 1 High

Needs changes: 1 high concern. The staging wiring, IsStaging gating, error unwrapping and storage-error classification look correct. But the new C symbols are not yet in the pinned bindings release, so the kernel build cannot link.

if e.query_id != nil {
ke.QueryID = C.GoString(e.query_id)
}
ke.ErrorCode = C.GoString(C.kernel_get_last_error_code())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The new C calls (kernel_get_last_error_code, kernel_statement_set_volume_options, and the is_volume_operation functions) need a newer kernel. go.mod still pins every bindings archive to v1.5.0, so consumer builds with databricks_kernel can fail to link. Bump the go.mod and go.sum pins to a release with the new ABI before releasing. The Makefile's KERNEL_REV source build avoids this only for development.

🔀 Found by both reviewers · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same release gate as #560 (comment). databricks/databricks-sql-kernel#520 and #521 are merged (KERNEL_REV now pins d18b044b), but the bindings modules and sums in go.mod and go.sum can only move once a bindings release ships, so this stays open until then.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at efc80cd: go.mod/go.sum still pin bindings v1.5.0, so this blocks release until the new bindings ship.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant