Skip to content

Conversation

@IMax153
Copy link
Collaborator

@IMax153 IMax153 commented Nov 23, 2025

No description provided.

@IMax153 IMax153 changed the title Maxwell.brown/optimize internals Optimize TypeScript CLI / SDK internals Nov 23, 2025
})

let meta: Uint8Array
const response = client.doGet(ticket)
Copy link
Contributor

Choose a reason for hiding this comment

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

How does the client handle disconnect without an abort signal?

Copy link
Collaborator Author

@IMax153 IMax153 Nov 23, 2025

Choose a reason for hiding this comment

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

Even though using Effect.async allows passing an AbortSignal to client.doGet, the AbortSignal would only be triggered if the call to Effect.async was interrupted (i.e. before the client is constructed).

Since the call to Effect.async is essentially synchronous here (i.e. immediately returns the client synchronously via Effect.sync), you would never observe the desired interruption behavior.

Instead, it's better here to let the stream manage the response lifetime.

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha. The underlying issue really that we have to stitch the arrow record batch reader into this because of its lackluster API and lack of native support for flight (among other things)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For sure, but I think that will require a larger refactor around Arrow as we've chatted about separately. It would be great to avoid having to dip in and out of Effect streams.

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.

3 participants