Skip to content

Conversation

@tsmith023
Copy link
Collaborator

@tsmith023 tsmith023 commented Jul 31, 2025

Core PRs for reference:

Known issues to tackle during beta:

  • Refactor/remove uuid_lookup if it is still necessary
  • Handle reference beacon appropriately in response message from stream
  • Provide options to client.batch.experimental() to change consistency levels
  • Handle CL.ALL correctly during shutdown, i.e. stop completely until all nodes have come back up
  • Implement async version of client.batch.experimental() in the async client, pseudo-code below
async def generator():
    for obj in objs:
        await asyncio.sleep(0) # gives control to event loop
        yield obj
        
async with client.batch.experimental() as batch:
    async for obj in generator():
        await batch.add_object()

Copy link

@orca-security-eu orca-security-eu bot left a comment

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 30.09901% with 353 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (dev/1.34@d3a8e30). Learn more about missing BASE report.

Files with missing lines Patch % Lines
weaviate/collections/batch/base.py 14.95% 273 Missing ⚠️
weaviate/collections/classes/batch.py 32.14% 19 Missing ⚠️
integration/test_batch_v4.py 50.00% 11 Missing ⚠️
weaviate/connect/v4.py 21.42% 11 Missing ⚠️
integration/test_rbac.py 42.85% 8 Missing ⚠️
weaviate/collections/batch/collection.py 65.21% 8 Missing ⚠️
weaviate/collections/batch/batch_wrapper.py 77.41% 7 Missing ⚠️
weaviate/collections/batch/client.py 63.15% 7 Missing ⚠️
weaviate/collections/batch/grpc_batch.py 75.00% 4 Missing ⚠️
weaviate/exceptions.py 55.55% 4 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##             dev/1.34    #1765   +/-   ##
===========================================
  Coverage            ?   86.79%           
===========================================
  Files               ?      273           
  Lines               ?    19655           
  Branches            ?        0           
===========================================
  Hits                ?    17060           
  Misses              ?     2595           
  Partials            ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weaviate-git-bot
Copy link

Great to see you again! Thanks for the contribution.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Slack channel?

@tsmith023 tsmith023 changed the base branch from main to dev/1.33 August 26, 2025 12:44
Copy link

@orca-security-eu orca-security-eu bot left a comment

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 Secrets high 0   medium 0   low 0   info 0 View in Orca

@tsmith023 tsmith023 changed the title Introduce batch.experimental() while server-side batching is in beta Introduce batch.experimental() while server-side batching is in _beta_ Nov 3, 2025
@tsmith023 tsmith023 changed the title Introduce batch.experimental() while server-side batching is in _beta_ Introduce batch.experimental() while server-side batching is in beta Nov 3, 2025
@tsmith023 tsmith023 changed the base branch from main to dev/1.34 November 4, 2025 13:26
Copy link

@orca-security-eu orca-security-eu bot left a comment

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 Secrets high 0   medium 0   low 0   info 0 View in Orca

@tsmith023 tsmith023 merged commit 8186d11 into dev/1.34 Nov 4, 2025
117 of 118 checks passed
@tsmith023 tsmith023 deleted the feat/server-side-batching branch November 4, 2025 13:49
tsmith023 added a commit that referenced this pull request Nov 10, 2025
* flat index: Add support for RQ and include cache param

* Update tests for RQ

* Add function to retry if http error

* Add 1.34 CI and test configuration and move function to conftest

* Update comments

* Add 134 version

* Set 1.34 dev image for CI jobs

* Add ACORN as defaul filter strategy in 1.34

* Comment backup test temporarily

* Introduce `batch.experimental()` while server-side batching is in beta (#1765)

* Add client-side changes to handle new server-side batching in 1.33

* Update images in CI

* Update 1.33 image in CI

* Alter test or lazy shard loading for new potential server behaviour

* Change other lazy loading test too

* Fix CI image for 1.33

* Update protos, fix setting of batch client in wrapper to avoid races with connection

* Remove debug assert in test

* Update new batch to use different modes with server, update CI image

* Refactor to changed server batching options

* Throw error if using automatic batching with incompatible server

* Add exponential backoff retry to stream reconnect method

* Remove timeout and retries from new grpc methods

* Only delete key if present in dict

* Close before re-connecting, reset rec num objs on shutdown

* Update to use latest protos and behaviour

* Improve logging using .automatic()

* Update CI image to latest server build

* Fix testing issues with new versions

* Attempt fixes for tests again

* Add ability to retry certain server-emitted full errors, e.g. temporary replication problems

* Attempt fixes of flakes

* Update to use latest server impl and CI image

* Update to use latest dev server version

* Rename from automatic to experimental, bump CI version to latest RC

* Push ongoing changes

* Update to use latest server image

* Update to use latest server changes

* Undo debug changes to conftest

* Update to use latest server image

* Make internal send/recv queue size 1 and sleep while shutdown to avoid pushing to it

* Update to use latest server image

* Fix shutting down message handling

* Skip backoff handling if client has closed the stream

* Remove unused code

* Don't print backoff adjustments when shutting down

* Improve shutting down log

* Attempt to catch last req that can be lost during shutdown

* Avoid circular import

* Remove last_req wrapping logic from stream, reduce logging, update image in ci

* Close the client-side of the stream on shutdown, sleep for backoff during req generation

* Update CI image

* Only log waiting for stream re-establishment once

* Switch from arm to amd in CI

* Shutdown client-side stream regardless of size of __reqs queue

* Increase timeout when waiting for req to send, don't use queue size in if due to unreliability

* Use sentinel in req put/get to avoid inaccurate block timeouts

* Update CI image

* Correctly populate batch.results

* Update CI images

* Assert indexing status in one of the allowed values rather than a specific value

* Undo debug changes in tests

* Update to match new server impl

* Update to use latest server image

* Only start threads once to avoid runtime error when handling shutdown

* Update CI images

* Hard-code SSB concurrency to 1 for now

* Fix collection.batch.automatic

* Correct logic in `_BgThreads.is_alive`

* Adjust default batch size to align with server default and avoid overloading server too fast

* Update CI images and version checks in tests

* Update to use latest server behaviour around backoffs and uuid/err results

* Lock once when reading batch results from stream

* Interpret context canceled as ungraceful shutdown to be restarted by client

* Use backoff message to adjust batch size

* Start batching with smallest allowed server value

* Add extra log in batch send

* Reintroduce timeout when getting from queue

* Add log to empty queue

* Add log to batch recv restart

* Remove timeout when getting from internal queue

* Only update batch size if value has changed

* Track then log total number of objects pushed by client

* WIP: receive shutdown as message and not rpc error

* Move result writing inside message.results case

* Add missing proto changes

* Update CI image

* Improve resiliance on unexpected server behaviour

---------

Co-authored-by: Dirk Kulawiak <dirk@semi.technology>

* Ensure created backup in test finishes before starting new test

* Wait until all nodes are back and healthy before reconnecting when CL=ALL

* Handle passing of ref beacons in response msgs (#1863)

---------

Co-authored-by: Rodrigo Lopez <rodrigo.lopez@weaviate.io>
Co-authored-by: Dirk Kulawiak <dirk@weaviate.io>
Co-authored-by: Dirk Kulawiak <dirk@semi.technology>
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.

5 participants