Document server-side batching ingest and refactor the batch import page#478
Document server-side batching ingest and refactor the batch import page#478g-despot wants to merge 4 commits into
Conversation
- 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
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
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 forinsert_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_SIZEdocumentation more linkable and correct its documented default; update multiple client docs/best-practices to steer users away from largeinsert_manycalls.
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.
| | `GO_PROFILING_PORT` | Sets the port for the Go profiler. Default: `6060` | `integer` | `6060` | | ||
| | `DEBUG_ENDPOINTS_ENABLED` | Gate for the debug HTTP listener (the profiling port set by `GO_PROFILING_PORT`, default `6060`), which serves Weaviate's **unauthenticated** internal debug and profiling endpoints — `/debug/config`, Go profiling (`/debug/pprof/*`, `/debug/fgprof`), and various maintenance and diagnostic routes. [Runtime-configurable](/deploy/configuration/env-vars/runtime-config.md) via the `debug_endpoints_enabled` override. Default: `false`. `GO_PROFILING_DISABLE` still controls whether the listener binds at all. <br/>Added in `v1.37.9` | `boolean` | `true` | | ||
| | `GRPC_MAX_MESSAGE_SIZE` | Maximum gRPC message size in bytes. Default: 10MB | `string - number` | `2000000000` | | ||
| | `GRPC_MAX_MESSAGE_SIZE`<a id="grpc_max_message_size"></a> | Maximum gRPC message size in bytes. Requests larger than this limit (e.g. a large `insert_many` call) are rejected. Default: `104858000` (approximately 100 MB) | `string - number` | `2000000000` | |
- 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.
There was a problem hiding this comment.
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
InterruptedExceptionis 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
InterruptedExceptionis 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
InterruptedExceptionis 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();
}
| ## Import with references | ||
| ### Import with references | ||
|
|
||
| You can batch create links from an object to another other object through cross-references. |
What
collection.data.ingest()(Python, sync + async; TypeScript) andcollection.Batch.InsertMany(C#), alongside the existing streaming examples.insert_many"message larger than max" (RESOURCE_EXHAUSTED) failure, keyed to the exact client-facing error, withingest/SSB as the fix.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.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 toingest/SSB. Go examples stay on manual batching (no SSB support in the Go client).Why
DX request:
data.ingest()shipped in the clients but was undocumented, and users who pass large lists toinsert_manyhit the gRPC size limit with no guidance anywhere in the docs. Server-paced imports also behave better on autoscaling clusters.Testing
manage-data.import.tsis excluded from CI).yarn build-devclean; the only two broken-anchor warnings are pre-existing and unrelated.Notes for reviewers
result.errorsrather thanresult.has_errors: the latter staysFalseon the ingest path in client 4.22.0 even when errors are populated (client bug, being reported upstream).