fix(timeout): respect insertion timeout from config for fixed_batch#2048
Open
jpsoultanis wants to merge 1 commit into
Open
fix(timeout): respect insertion timeout from config for fixed_batch#2048jpsoultanis wants to merge 1 commit into
jpsoultanis wants to merge 1 commit into
Conversation
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 |
tsmith023
approved these changes
May 29, 2026
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
|
I agree with the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There's a bug where the Weaviate Python client SDK doesn't respect the
config.Timeoutfor batch insertions. This issue dates back a while._BatchBase.__send_batchpasses a hardcodedDEFAULT_REQUEST_TIMEOUT = 180as the gRPC deadline forBatchObjects[src]:This silently ignores set values in config
additional_config.timeout.insert. Ex:The change in this PR makes it honor the configured
Timeout.insertconfig value, matching the sibling code paths (batch deletion,insert_many).Context
Timeout.insertis already honored by other write paths:_DataExecutor.insert_many—weaviate/collections/data/executor.py:216grpc_batch_delete(sync) —weaviate/connect/v4.py:1048grpc_batch_delete(async) —weaviate/connect/v4.py:1230__send_batchinweaviate/collections/batch/base.pywas the odd one out.Behavior change
This PR as-is comes with an important behavioral change in the default case. The default
Timeout.insertis 90s (weaviate/config.py:59). Users on the default configuration will now see a 90s gRPC insertion deadline onBatchObjectsinstead of the previous 180s. This makes theTimeout.insertfield actually reflect the value used at the call site, at the cost of a tighter default.If 90s turns out to be too tight specifically for batch with server-side vectorizers, this requires further discussion by Weaviate maintainers. We could potentially raise this default to 180s to match the previous default, but this comes with additional tradeoffs to consider.