fix(services): add configurable batch size with file container rotation#189
Closed
y-lakhdar wants to merge 6 commits intofeat/configurable-batch-size-infrastructurefrom
Closed
Conversation
- Add configurable batch size to PushService, StreamService, UpdateStreamService - Implement per-batch file container rotation for UpdateStreamService - Each batch creates own file container and pushes immediately (catalog API best practice) - Fix: PushService now respects system property (was hardcoded to DEFAULT_QUEUE_SIZE) - Fix: flushAndPush() guards against null updateStreamService with uploader fallback - Add CONFIGURATION.md and UPGRADE_NOTES.md documentation - Update README.md with configuration section - Add comprehensive tests for batching and rotation behavior Breaking changes: - Default batch size increased from 5MB to 256MB - UpdateStreamService pushes each batch immediately instead of accumulating Fixes reviewer feedback: - PushService now uses getConfiguredBatchSize() instead of DEFAULT_QUEUE_SIZE - StreamDocumentUploadQueue.flushAndPush() now handles null updateStreamService
a1e5980 to
23deee5
Compare
- Remove UPGRADE_NOTES.md (no breaking changes to document) - Add samples/ConfigureBatchSize.java showing 3 ways to configure batch size - Restore original UpdateStreamDocuments.java (remove verbose comments) - Update CONFIGURATION.md
lavoiesl
reviewed
Jan 30, 2026
alexprudhomme
approved these changes
Feb 4, 2026
Contributor
Author
|
created a different PR instead with better architecture : #190 |
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
Adds configurable batch size support to all push services and implements per-batch file container rotation for UpdateStreamService following Coveo's catalog stream API best practices.
Key Changes
Configurable Batch Size
All services now support custom batch sizes (max: 256MB):
PushService(source, options, maxQueueSize)StreamService(source, options, userAgents, maxQueueSize)UpdateStreamService(source, options, userAgents, maxQueueSize)File Container Rotation (UpdateStreamService)
Each batch now gets its own file container:
This follows the catalog stream API best practices.
Testing
Part 3 of 3 - Split from PR #186
Dependencies: Should merge after #187 and #188