Skip to content

Document server-side batching ingest and refactor the batch import page#478

Merged
g-despot merged 5 commits into
mainfrom
docs/ssb-ingest-import-refactor
Jul 23, 2026
Merged

Document server-side batching ingest and refactor the batch import page#478
g-despot merged 5 commits into
mainfrom
docs/ssb-ingest-import-refactor

Conversation

@g-despot

Copy link
Copy Markdown
Contributor

What

  • Documents the one-shot server-side batching (SSB) entry points that were missing from the docs: collection.data.ingest() (Python, sync + async; TypeScript) and collection.Batch.InsertMany (C#), alongside the existing streaming examples.
  • Adds an FAQ troubleshooting entry for the insert_many "message larger than max" (RESOURCE_EXHAUSTED) failure, keyed to the exact client-facing error, with ingest/SSB as the fix.
  • Makes the env-vars table the single source of truth for GRPC_MAX_MESSAGE_SIZE (row anchor added; other pages link to it) and corrects the stale 10MB default — it has been 104858000 (~100 MB) since Jan 2025.
  • Refactors manage-objects/import.mdx: removes the "Use the gRPC API" and "Python-specific considerations" sections, promotes Error handling to its own section (it previously only rendered inside the Python tab), rewrites "Stream data from large files" as guidance, trims "Asynchronous imports", and merges the four "Specify …" sections under Customize imported objects (existing anchors preserved) with snippets updated to ingest/SSB. Go examples stay on manual batching (no SSB support in the Go client).
  • Ranks SSB first on the Python client pages and in best practices.

Why

DX request: data.ingest() shipped in the clients but was undocumented, and users who pass large lists to insert_many hit the gRPC size limit with no guidance anywhere in the docs. Server-paced imports also behave better on autoscaling clusters.

Testing

  • Every touched Python/TypeScript/Java/C# example was executed against a live Weaviate 1.38.0 (TypeScript run manually; manage-data.import.ts is excluded from CI).
  • The FAQ error was reproduced empirically (client 4.22.0, low server limit); the wording matches the verbatim error.
  • yarn build-dev clean; the only two broken-anchor warnings are pre-existing and unrelated.

Notes for reviewers

  • The Python ingest example checks result.errors rather than result.has_errors: the latter stays False on the ingest path in client 4.22.0 even when errors are populated (client bug, being reported upstream).
  • The Java and C# "Import with references" examples intentionally remain on their current APIs; no batch-context reference idiom exists to document yet.

- Add the one-shot SSB entry points to the batch import docs: data.ingest()
  (Python sync+async, TypeScript) and Batch.InsertMany (C#), alongside the
  streaming examples
- Add an FAQ entry for the insert_many 'message larger than max'
  (RESOURCE_EXHAUSTED) failure with the verified client error and the
  ingest/SSB fix
- State the GRPC_MAX_MESSAGE_SIZE default only in the env-vars table (row
  anchor added); other pages link to it; correct the stale 10MB value
- Refactor manage-objects/import.mdx: remove the gRPC API and
  Python-specific sections, promote Error handling to its own section,
  rewrite Stream data from large files as tips, trim Asynchronous imports,
  and merge the four Specify sections under Customize imported objects with
  snippets moved to ingest/SSB (Go remains manual batching)
- Rank SSB first on the Python client pages and best practices

@orca-security-eu orca-security-eu 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.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Weaviate docs to better document server-side batching (SSB) “one-shot ingest” entry points across clients, refactors the batch import guide to foreground SSB and centralize error-handling guidance, and adds troubleshooting guidance for gRPC message size failures.

Changes:

  • Add an FAQ entry explaining the RESOURCE_EXHAUSTED “message larger than max” error for insert_many/insertMany, and recommend SSB (ingest/streaming) as the primary fix.
  • Refactor the batch import guide to prioritize server-side batching and introduce an explicit “Ingest an in-memory list” section with updated code snippets.
  • Make GRPC_MAX_MESSAGE_SIZE documentation more linkable and correct its documented default; update multiple client docs/best-practices to steer users away from large insert_many calls.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/weaviate/more-resources/faq.md Adds FAQ troubleshooting for gRPC RESOURCE_EXHAUSTED on large batch inserts and points to SSB.
docs/weaviate/manage-objects/import.mdx Restructures the import guide (SSB first), adds “ingest” section, consolidates customization sections, and promotes error handling.
docs/weaviate/concepts/data-import.mdx Expands the SSB resilience explanation (autoscaling/memory-pressure framing).
docs/weaviate/client-libraries/python/notes-best-practices.mdx Documents collection.data.ingest() as a one-shot SSB convenience in batching best practices.
docs/weaviate/client-libraries/python/index.mdx Adds a “Batch imports” section describing SSB options and warning against large insert_many calls.
docs/weaviate/client-libraries/python/async.md Adds data.ingest() to async client bulk insertion docs and cautions against large insert_many.
docs/weaviate/best-practices/index.md Updates import best practices to recommend SSB (batch.stream() / data.ingest()) and links to concepts/docs.
docs/deploy/configuration/env-vars/index.md Corrects GRPC_MAX_MESSAGE_SIZE documented default and adds an explicit anchor for cross-page linking.
_includes/code/java-v6/src/test/java/ManageObjectsImportTest.java Updates Java examples to use server-side batching (collection.batch.start()) in several “batch import” snippets.
_includes/code/howto/manage-data.import.ts Updates TypeScript snippets to use data.ingest() (SSB) rather than insertMany.
_includes/code/howto/manage-data.import.py Updates Python snippets to use data.ingest() and adjusts examples/tests accordingly.
_includes/code/csharp/ManageObjectsImportTest.cs Adds/updates C# snippets to document both streaming SSB (StartBatch) and one-shot SSB ingest (Batch.InsertMany).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/deploy/configuration/env-vars/index.md Outdated
Comment thread _includes/code/java-v6/src/test/java/ManageObjectsImportTest.java
Comment thread _includes/code/java-v6/src/test/java/ManageObjectsImportTest.java
Comment thread _includes/code/java-v6/src/test/java/ManageObjectsImportTest.java
g-despot added 3 commits July 22, 2026 17:39
- TypeScript: the server-side batching example now streams from a sync
  generator passed to data.ingest(), and a separate ServerSideIngestExample
  shows the in-memory array flavor (both executed against a live 1.38.0
  with persistence checks)
- Remove the Batch imports section from the Python client page
- Remove the redundant lowercase anchor from the GRPC_MAX_MESSAGE_SIZE row
  (links use the APITable-generated anchor)
- Add the data import best practices blog post to Further resources
The server-side batching, ingest, and error-handling sections mixed
Python-specific method names into shared paragraphs. The shared prose is
now language-neutral and each language tab carries its own wording, so a
selected language reads as one coherent story. Error handling gains a
per-language tab block; the Go tab stays generic because the Go example
does not consume the batch response.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

_includes/code/java-v6/src/test/java/ManageObjectsImportTest.java:175

  • This InterruptedException is swallowed after re-interrupting the thread, so the test/doc snippet can continue in a partially-failed state. After restoring the interrupt flag, propagate the failure (e.g., throw) so the interruption is visible to callers and the test fails fast.
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }

_includes/code/java-v6/src/test/java/ManageObjectsImportTest.java:217

  • This InterruptedException is swallowed after re-interrupting the thread, so execution continues with an incomplete batch import. After restoring the interrupt flag, propagate the interruption (e.g., throw) so failures are not silently ignored.
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }

_includes/code/java-v6/src/test/java/ManageObjectsImportTest.java:314

  • This InterruptedException is swallowed after re-interrupting the thread. Propagating the interruption (after restoring the interrupt flag) makes the failure explicit and avoids continuing with a partially-applied import.
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }

Comment thread docs/weaviate/manage-objects/import.mdx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@g-despot
g-despot merged commit ea4116d into main Jul 23, 2026
13 checks passed
@g-despot
g-despot deleted the docs/ssb-ingest-import-refactor branch July 23, 2026 13:52
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.

2 participants