Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions napi/NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ layout, or npm publishing. Pure-kernel changes go in the root

### Fixed

- `AsyncStatement.close()` now releases its canceller and the result streams of its `AsyncResultHandle`s. These held the session until JS garbage collection, so a host's shared telemetry client, and its settings, outlived every closed session and were reused by the next one. Fetching from an `AsyncResultHandle` after its statement is closed now returns `InvalidStatementHandle`, unless a fetch was using the stream when `close()` ran.

---
*Note: When making changes, please add your change under the appropriate
section with a brief description. At release time, move the entries here
Expand Down
6 changes: 6 additions & 0 deletions napi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,10 @@ export declare class AsyncStatement {
* closed-handle short-circuit and returns `Ok(())` without
* re-attempting the wire call. The kernel's own `Drop`
* fire-and-forget retry runs once in the background.
*
* Also invalidates the handles `awaitResult()` returned: their
* `fetchNextBatch()` then rejects with `InvalidStatementHandle`,
* unless a fetch was in progress when `close()` ran.
*/
close(): Promise<void>
}
Expand Down Expand Up @@ -887,6 +891,8 @@ export declare class AsyncResultHandle {
* message), suitable for handing to `apache-arrow`'s
* `RecordBatchReader`. Byte-identical to the sync
* `Statement.fetchNextBatch()` payload for the same query.
* Rejects with `KernelError(InvalidStatementHandle)` after the
* parent `AsyncStatement` is closed (see `AsyncStatement.close()`).
*/
fetchNextBatch(): Promise<ArrowBatch | null>
/**
Expand Down
Loading
Loading