Skip to content

Conversation

@DanielJanicek
Copy link
Contributor

When a batch stream exits, it hits this check. If a batch did not have a number of elements that exactly matched the batch size the client chose, it would leave a batch thread a live very briefly, and would trigger this wait even though the thread was about to close. This lead to situations where submitting 99 objects in a batch would actually be slower(by about 1 second) than submitting 100 objects.

Lowering this wait means that we do our second check for live threads much more quickly, and so we wait on the client process for .05 seconds instead of 1 second. Testing with Locust confirms this performance improvement.

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

@tsmith023
Copy link
Collaborator

Ah the linter is complaining, I'll fix that quickly for you

@tsmith023 tsmith023 merged commit 2e0ffab into main Dec 11, 2025
105 of 110 checks passed
@tsmith023 tsmith023 deleted the djanicek/lower-thread-wait-retry branch December 11, 2025 17: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.

3 participants