Skip to content

perf(s3vectors): parallelize put_vectors across batches using ThreadP… - #259

Merged
Kaap10 merged 2 commits into
codeforstartups:developmentfrom
Uzmaa7:feature/parallelize-put-vectors
Sep 26, 2026
Merged

Kaap10 merged 2 commits into
codeforstartups:developmentfrom
Uzmaa7:feature/parallelize-put-vectors

Conversation

@Uzmaa7

@Uzmaa7 Uzmaa7 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Description

Parallelized batch execution in S3VectorsStore.put_vectors using ThreadPoolExecutor to speed up large vector ingestions while preserving error propagation.

Related issue

Fixes #13

Changes

  • Wrapped 500-vector batch uploads in ThreadPoolExecutor with worker count bounded by batch count (min(max_workers, len(chunks))).
  • Utilized as_completed and future.result() to ensure exceptions in any worker thread are re-raised immediately.
  • Added throughput test with mock latency and error propagation unit test in tests/test_s3vectors.py.

Testing

  • Tests pass locally
  • Ruff checks pass
  • Documentation updated, if applicable

Checklist

  • My changes are focused and relevant to this pull request.
  • I have added or updated tests where appropriate.
  • I have reviewed my changes for unrelated modifications.
  • I have updated documentation where necessary.

@Uzmaa7

Uzmaa7 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

I've submitted a pull request for this issue: #259. All CI checks are passing

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Clean implementation of batch parallelization using ThreadPoolExecutor with proper exception propagation and throughput unit tests.

@Kaap10
Kaap10 merged commit 1fa3fbf into codeforstartups:development Sep 26, 2026
3 checks passed
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.

Parallelize put_vectors across batches

2 participants