Skip to content

feat(documents): add abort signal to import and importStream - #379

Merged
tharropoulos merged 1 commit into
typesense:masterfrom
tharropoulos:abort-import
Oct 19, 2026
Merged

tharropoulos merged 1 commit into
typesense:masterfrom
tharropoulos:abort-import

Conversation

@tharropoulos

Copy link
Copy Markdown
Collaborator

Change Summary

import() and importStream() take an abortSignal as a third argument, like search() and multiSearch.perform():

await client
  .collections("companies")
  .documents()
  .import(documents, { action: "upsert" }, { abortSignal: controller.signal });

Imports skip the connection timeout. A caller that gave up on an import left the request running, and the client kept retrying it after a 5xx or a network error. When the signal aborts, the request is cancelled and no retry starts.

PR Checklist

@tharropoulos
tharropoulos merged commit 1f7b80e into typesense:master Oct 19, 2026
1 check passed
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