Skip to content

Complete configured Volume transfers through the native backend - #613

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

aakash-saravanan-db wants to merge 50 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

Configured staging operations need to finish their Volume transfer through the native backend before executeStatement resolves.

What this PR addresses

Delegate marked file PUT, GET and REMOVE to the shared native core, preserve raw results when staging is omitted, and map staging and local-file errors through the Node API. Native completion declarations and enum exports are generated from the binding source.

Dependencies

Requires the Volume APIs in databricks/databricks-sql-kernel#465 and a compatible coordinated native release. Platform package pins and locks, plus clean installed-driver validation, must be updated before merge.

Kernel version

The compatible kernel release has not been selected. When it is available, update every platform package pin and lockfile in this PR and validate a clean installation before merge. KERNEL_REV selects source for local and CI builds only.

Tests and validation

The focused suites pass: 306 tests. TypeScript build, production ESLint and formatting pass. Native declarations use NAPI-RS CLI 3.8.2.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from ad49367 to 7b276d7 Compare November 14, 2026 00:40
@github-actions github-actions Bot removed the kernel-e2e Preview-run the SEA Kernel E2E suite on this PR label Nov 14, 2026
@aakash-saravanan-db aakash-saravanan-db added the kernel-e2e Preview-run the SEA Kernel E2E suite on this PR label Nov 14, 2026
@aakash-saravanan-db
aakash-saravanan-db force-pushed the aakash-saravanan_data/feat/volume-restart-20261113 branch from 7b276d7 to 12876fc Compare November 14, 2026 00:52
@aakash-saravanan-db aakash-saravanan-db added kernel-e2e Preview-run the SEA Kernel E2E suite on this PR and removed kernel-e2e Preview-run the SEA Kernel E2E suite on this PR labels Nov 14, 2026
@aakash-saravanan-db
aakash-saravanan-db marked this pull request as ready for review November 14, 2026 02:18

@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 Medium · 1 Low

Mostly sound, with one medium issue: on the kernel path, the new StagingError wrapping can also catch the statement's own execution errors, not just transfer errors. Nits: there is a stray blank line in the CHANGELOG entry, and the constructor comment in KernelOperationBackend still says cancel() "always routes to the cancellable execution". Follow-up (not caused by this PR): executeStatement waits for the transfer before it returns the operation, so a caller can only interrupt an in-flight transfer by closing the session.

Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 2 Medium · 2 Low

Needs changes: 3 medium and 1 low concern. The staging dispatch and error mapping look right, but the PR ships behavior that depends on the unreleased native binding with no capability gate, and it changes socketTimeout: 0 semantics without a test or a CHANGELOG entry.

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

const handle = await this.getFetchHandle();
let outcome;
try {
outcome = await handle.completeVolumeOperation(allowedPaths, true); // Thrift REMOVE treats missing objects as success.

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 — completeStagingOperation calls handle.completeVolumeOperation unconditionally, and assertBindingShape never checks for it. With an older installed binding (platform packages are still pinned to 1.4.0), kernel executeStatement with stagingAllowedLocalPath throws a raw TypeError. Previously it warned and returned results. Add a capability check that gives a clear error, and bump the pins together with this change.

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

Release gate. The kernel ships as 1.5.0 first; this PR then moves every platform package pin and the lockfile to 1.5.0 before merge, so npm installs get a binding with completeVolumeOperation and the zero-timeout handling. No capability check is added: the TypeScript and the binding ship as one pinned set. Keeping this thread open until the pins move.

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 0947cc8: the platform pins in package.json:95-102 are still 1.4.0, so this blocks merge until they move to 1.5.0.

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.

Correction: the zero-timeout handling no longer applies. socketTimeout is back to main's behaviour and does not limit Volume transfers, same as Thrift. The pin gate stands.

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 292db68: package.json:95-102 still pins every platform package to 1.4.0, so this blocks merge until they move to 1.5.0.

Comment thread CHANGELOG.md Resolved
Comment thread tests/unit/kernel/execution.test.ts Resolved
Comment thread lib/DBSQLSession.ts Resolved
Comment thread lib/kernel/KernelAuth.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 2 Low

Mostly sound, with 2 medium concerns. The staging dispatch and error mapping look correct. Merging is still blocked, as the PR description says, on the platform package pin and lockfile updates.

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 — Completion now unconditionally requires the new native API, but npm installations still receive the pinned 1.4.0 packages rather than the coordinated release required by this PR; updating KERNEL_REV only changes source builds. Update every platform package pin and lockfile to the compatible release and validate staging through a clean installed driver before merging. (Found by GPT-6.1 Sol · the judge couldn't confirm it)

Comment thread lib/DBSQLSession.ts Resolved
Comment thread tests/unit/kernel/execution.test.ts Resolved
Comment thread lib/kernel/KernelAuth.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 2 Low

Mostly sound: 1 medium and 1 low concern. The PR already notes that native pins are pending. Until they land, an older binding has no completeVolumeOperation, so every statement run with stagingAllowedLocalPath would throw a TypeError on the kernel backend instead of the old no-op.

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 lib/kernel/KernelErrorMapping.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Comment thread lib/kernel/KernelAuth.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 2 Low

Needs changes: 1 high, 1 medium. With the currently pinned 1.4.0 native binaries, the staging completion call and the forwarded socketTimeout: 0 would break kernel users until the compatible binding pins land in this PR.

Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/kernel/KernelErrorMapping.ts Resolved
Comment thread lib/kernel/KernelAuth.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 3 Low

Looks reasonable, with 1 medium and 1 low concern. The kernel staging dispatch, error mapping and tests match the Thrift path's behavior. As the PR description says, the native platform pins and locks still have to be bumped before merge.

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 lib/kernel/KernelAuth.ts Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/kernel/KernelErrorMapping.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

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

Verdict: 2 High · 2 Low

Needs changes — 1 high, 1 medium, 1 low. The delegation logic looks right, but the code calls native APIs and relies on native semantics that the pinned 1.4.0 binaries don't provide.

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 lib/kernel/KernelErrorMapping.ts Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/kernel/KernelAuth.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 3 Low

Mostly sound, with 1 medium and 2 low concerns. The dispatch, completion and error mapping hold together, but the code assumes native APIs that the pinned 1.4.0 bindings don't ship yet.

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 lib/DBSQLSession.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/kernel/KernelErrorMapping.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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

Mostly sound, with 1 medium and 1 low concern. The facade dispatch, the result gating after completion and the staging error mapping look right. Kernel Volume support still depends on a published native package and platform pins, which the PR description already tracks.

This overview is Claude Opus 5.5's initial take; some of its points were set aside by the cross-check judge — see the findings below.

🔀 2 findings considered and dismissed by the judge
  • 🟡 Medium lib/DBSQLSession.ts:118 — When native completion rejects, executeStatement never returns the already-registered operation, leaving its resources and session collection entry inaccessible
    Judge's evidence: await this.operations.closeAll();
  • 🟡 Medium tests/e2e/kernel/staging-close-e2e.test.ts:54 — If polling or session close stalls, Mocha's timeout fails the test without settling these awaits, so the finally block cannot finish and the listening HTTP serv
    Judge's evidence: this.timeout(10000);

Comment thread lib/kernel/KernelErrorMapping.ts Resolved
Comment thread CHANGELOG.md Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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 · 2 Low

The design looks sound — 1 medium and 1 low concern, both about native binding compatibility. The completion path, error mapping and the reused staging e2e suite look correct. Like Thrift, a failed transfer leaves the operation registered and unclosed; that was already the case before this PR and could be follow-up work.

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 lib/kernel/KernelErrorMapping.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved
Comment thread CHANGELOG.md Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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

Mostly sound, with 1 medium and 1 low concern. The kernel completion path matches the Thrift staging contract. The medium concern is that the code assumes a native binding the published package pins don't ship yet.

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 lib/kernel/KernelOperationBackend.ts Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/kernel/KernelErrorMapping.ts Resolved
Signed-off-by: Aakash Saravanan <aakash.saravanan@databricks.com>

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

🔀 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

Mostly sound, with one medium concern: kernel staging dispatch calls the new native method without checking the loaded binding supports it. Error mapping, cancel/close handling and test coverage look correct. The pins and a published native release are still open, 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 lib/DBSQLSession.ts Resolved
Comment thread lib/kernel/KernelOperationBackend.ts Resolved

This branch was successfully deployed

1 active deployment
azure-prod — 14b8cfb0 Deployed Nov 23, 2026 by aakash-saravanan-db via e2e-test (24.22.1, 24_22_1) #2209
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