cschneider opened a new pull request, #191: URL: https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/191
https://issues.apache.org/jira/browse/SLING-13396 Adds an opt-in batch import to the journal subscriber for package builders whose install step is slow (e.g. one remote call per package). Related to SLING-13021, but keeps the subscriber single-threaded and leaves concurrency to the builder, which knows the paths and can keep the ordering between overlapping packages. ### Changes - New exported SPI `org.apache.sling.distribution.journal.spi.BatchDistributionPackageBuilder` (1.0.0) with `installPackages(ResourceResolver, List<DistributionPackage>)`. - New subscriber setting `maxBatchSize` (default 1 = unchanged behaviour). Only active for non-editable agents with `packageHandling=Off` and a builder implementing the SPI; otherwise a warning is logged. - Poller → bounded queue → importer thread; the importer takes what is already queued (up to `maxBatchSize`), so no extra latency for single packages. - Consecutive ADD/DELETE packages accepted by the precondition form a batch; other packages end it and are processed as today. - Last offset is committed together with the batch. On failure no offset is stored and the packages are re-imported one by one with the existing retry / error queue handling (at-least-once). - New metrics `imported_batch_size`, `imported_batch_duration`; docs updated. ### Tests - `BookKeeperBatchTest`, `SubscriberBatchTest`; full build green (246 tests, bnd baseline OK). ### Open points - Editable agents are not supported yet: they store a single status per commit but must report one per package. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
