gnodet opened a new pull request, #31305:
URL: https://github.com/apache/camel/pull/31305

   ## Summary
   
   Fix five confirmed bugs in `camel-infinispan` cluster views and remote 
repositories:
   
   1. **Cluster view `lifespan=1` crash** (embedded & remote): 
`scheduleAtFixedRate` throws `IllegalArgumentException` when `lifespan/2` is 0 
due to integer division. Fix: compute the period in milliseconds with a minimum 
of 1.
   
   2. **Remote cluster view sub-second lifespan never expires**: `(int) 
toSeconds()` truncates sub-second values to 0, which means no expiry in 
Infinispan. Fix: remove the `lifespan` field and use `replaceWithVersion` 
overload with `TimeUnit` directly from configuration.
   
   3. **Remote cluster service / repositories fail with 
`camel-langchain4j-embeddings` on the classpath**: 
`InfinispanRemoteConfiguration` defaults `embeddingStoreEnabled=true` with 
dimension 0, so `InfinispanRemoteManager` fails with "embeddingStoreDimension 
must be configured". Fix: set `embeddingStoreEnabled=false` in cluster 
configuration and all repository `doStart()` methods.
   
   4. **Remote aggregation repository ignores `hosts`, credentials and 
`configurationUri`**: `doStart()` always creates a 
`cacheContainerConfiguration` (to register 
`DefaultExchangeHolderContextInitializer`), so `InfinispanRemoteManager` skips 
its hosts/credentials path and connects to 127.0.0.1:11222. Fix: build the 
client configuration from the connection properties first, then add the context 
initializer.
   
   5. **Remote idempotent/key-value repository NPE without `hosts`**: 
`ConfigurationBuilder.addServers(null)` throws `NullPointerException`. Fix: 
validate hosts with a clear error message.
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-28000
   
   ## Test plan
   
   - [x] New `InfinispanRemoteConfigurationTest` with 4 tests:
     - Cluster configuration disables embedding store
     - Manager requires hosts when no cacheContainer or 
cacheContainerConfiguration
     - Scheduling period is at least 1ms for lifespan=1
     - Scheduling period is at least 1ms for sub-second lifespan
   - [x] Existing `InfinispanRemoteClusterViewStopTest` (3 tests) passes 
without changes
   - [x] Full test suite (115+ tests) passes across both embedded and remote 
modules
   
   _Claude Code on behalf of Guillaume Nodet_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to