The Wire · Showcase
SPRING-AI PATCHES SILENT PRECISION LOSS IN MILVUS METADATA
By RepoJournal · Filed · About Spring
Spring AI fixed a critical bug where large integer identifiers in Milvus search results were silently truncated to doubles, losing data for any ID exceeding 2^53.
The Milvus vector store was deserializing JSON metadata using Gson's default strategy, which treats all numbers as doubles [1]. This caused precision loss for large integer IDs like external references and counts, potentially corrupting data without warning. The fix switches Gson to preserve integer types, protecting identifiers that exceed double's precision ceiling [1]. Spring AI also documented this numeric behavior in reference docs [2] and extracted the Gson instance to a static field to eliminate repeated instantiation on every search call, cutting allocation overhead [3]. Across the portfolio, Spring Boot merged multiple copyright header corrections and Spring Framework extended annotation discovery to transitive interfaces [4], both foundation-level improvements that shore up edge cases.
Action items
- → Upgrade Spring AI to pick up Milvus metadata precision fix before using vector search with large identifiers spring-projects/spring-ai [immediate]
- → Review any Milvus search results currently in production where IDs might exceed 2^53 spring-projects/spring-ai [plan]
- → Test Spring Framework annotation resolution if using transitive interface annotations spring-projects/spring-framework [monitor]
References
- [1] Fix Milvus metadata integer values returned as Long instead of Double spring-projects/spring-ai
- [2] Document Milvus metadata numeric type behavior in reference docs spring-projects/spring-ai
- [3] Extract METADATA_GSON as a static field in MilvusVectorStore spring-projects/spring-ai
- [4] Find transitive interface annotations in findAllLocalMergedAnnotations() spring-projects/spring-framework
FAQ
- What changed in Spring on July 1, 2026?
- Spring AI fixed a critical bug where large integer identifiers in Milvus search results were silently truncated to doubles, losing data for any ID exceeding 2^53.
- What should Spring teams do about it?
- Upgrade Spring AI to pick up Milvus metadata precision fix before using vector search with large identifiers • Review any Milvus search results currently in production where IDs might exceed 2^53 • Test Spring Framework annotation resolution if using transitive interface annotations
- Which Spring repositories shipped on July 1, 2026?
- spring-projects/spring-ai, spring-projects/spring-framework