The Wire · Showcase
SPRING-AI FIXES SILENT DATA LOSS IN BATCH EMBEDDING STRATEGY
By RepoJournal · Filed · About Spring
A critical bug in TokenCountBatchingStrategy was dropping duplicate documents during batch processing, silently returning fewer embeddings than requested.
Spring AI shipped a fix [1] for TokenCountBatchingStrategy that was collapsing identical documents into a single map entry, causing silent data loss when processing chunks from content-based ID generators. This surfaces as a misleading failure where the provider returns fewer embeddings than documents were passed in. Across the dependency stack, Spring Kafka quietly retired 3.3.x from its maintenance matrix [2], marking the branch as read-only since it's no longer open source. The ecosystem is synchronizing on patch versions: Jackson dependencies are rolling forward across both Spring Integration [3] and Spring Kafka [4][5], while gRPC [6] reverted a connection reuse optimization that was causing problems in xds-heavy deployments with many targets. Spring Kafka also absorbed updates to Hibernate Validator [8] and Log4j [7], with the latter improving error handling for LinkageError scenarios.
Action items
- → If using Spring AI embeddings: verify batch operations aren't silently dropping duplicate documents in production spring-projects/spring-ai [immediate]
- → Spring Kafka users on 3.3.x: plan migration to a maintained branch immediately since 3.3.x is no longer receiving updates spring-projects/spring-kafka [plan]
- → Roll Jackson patch versions [ref:1][ref:6][ref:7] at next build cycle as part of standard maintenance spring-projects/spring-kafka [monitor]
References
- [1] Fix `TokenCountBatchingStrategy` dropping equal documents spring-projects/spring-ai
- [2] Remove 3.3.x from dependabot.yml spring-projects/spring-kafka
- [3] Bump com.fasterxml.jackson:jackson-bom from 2.22.0 to 2.22.1 ↗ spring-projects/spring-integration
- [4] Bump com.fasterxml.jackson:jackson-bom from 2.21.4 to 2.21.5 ↗ spring-projects/spring-kafka
- [5] Bump tools.jackson:jackson-bom from 3.1.4 to 3.1.5 ↗ spring-projects/spring-kafka
- [6] Bump io.grpc:grpc-bom from 1.81.0 to 1.81.1 ↗ spring-projects/spring-integration
- [7] Bump org.apache.logging.log4j:log4j-bom from 2.25.4 to 2.25.5 ↗ spring-projects/spring-kafka
- [8] Bump org.hibernate.validator:hibernate-validator from 9.1.1.Final to 9.1.2.Final in the development-dependencies group ↗ spring-projects/spring-kafka