[
https://issues.apache.org/jira/browse/CAMEL-27936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27936:
--------------------------------
Description:
Found while improving the option descriptions of camel-infinispan for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/d5a852f1554249665c55be65e7b60727f2348b3f,
pull request https://github.com/apache/camel/pull/31191).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. The endpoint fails to start when hosts is not set
{{InfinispanRemoteManager.doStart}} calls
builder.addServers(configuration.getHosts()) also when hosts is null; the Hot
Rod ConfigurationBuilder.parseServers then throws a NullPointerException, even
when configurationUri or configurationProperties give
infinispan.client.hotrod.server_list.
Proposed change: call addServers only when hosts is not empty.
h4. 2. eventTypes and flags are not trimmed
{{InfinispanRemoteConsumer.ConsumerHandler.doStart}} (eventTypes) and
{{InfinispanRemoteConfiguration.setFlags(String)}} split on "," without
trimming, so "CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_REMOVED" fails in
valueOf. infinispan-embedded got this fix in CAMEL-27605.
Proposed change: trim each entry.
h4. 3. Smaller issues
{{InfinispanVectorQueryBuilder.build}} calls cache.query(...) twice and
discards the first result. embeddingStoreEnabled defaults to true, so with
camel-langchain4j-embeddings on the classpath every infinispan endpoint,
consumers included, fails to start unless embeddingStoreDimension is set; the
"producer,advanced" label hides that. With cacheContainer or
cacheContainerConfiguration set, the embedding marshaller is not set.
getEmbeddingStoreDimension() returns long, while the field and setter are int.
The infinispan-embedded doc page has the same outdated query example
(build(QueryFactory)) that this pull request fixes on the infinispan page.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-infinispan for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31191).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. The endpoint fails to start when hosts is not set
{{InfinispanRemoteManager.doStart}} calls
builder.addServers(configuration.getHosts()) also when hosts is null; the Hot
Rod ConfigurationBuilder.parseServers then throws a NullPointerException, even
when configurationUri or configurationProperties give
infinispan.client.hotrod.server_list.
Proposed change: call addServers only when hosts is not empty.
h4. 2. eventTypes and flags are not trimmed
{{InfinispanRemoteConsumer.ConsumerHandler.doStart}} (eventTypes) and
{{InfinispanRemoteConfiguration.setFlags(String)}} split on "," without
trimming, so "CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_REMOVED" fails in
valueOf. infinispan-embedded got this fix in CAMEL-27605.
Proposed change: trim each entry.
h4. 3. Smaller issues
{{InfinispanVectorQueryBuilder.build}} calls cache.query(...) twice and
discards the first result. embeddingStoreEnabled defaults to true, so with
camel-langchain4j-embeddings on the classpath every infinispan endpoint,
consumers included, fails to start unless embeddingStoreDimension is set; the
"producer,advanced" label hides that. With cacheContainer or
cacheContainerConfiguration set, the embedding marshaller is not set.
getEmbeddingStoreDimension() returns long, while the field and setter are int.
The infinispan-embedded doc page has the same outdated query example
(build(QueryFactory)) that this pull request fixes on the infinispan page.
_Claude Code on behalf of davsclaus_
> camel-infinispan: startup fails without hosts, eventTypes and flags are not
> trimmed
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-27936
> URL: https://issues.apache.org/jira/browse/CAMEL-27936
> Project: Camel
> Issue Type: Bug
> Components: camel-infinispan
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-infinispan for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/d5a852f1554249665c55be65e7b60727f2348b3f,
> pull request https://github.com/apache/camel/pull/31191).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. The endpoint fails to start when hosts is not set
> {{InfinispanRemoteManager.doStart}} calls
> builder.addServers(configuration.getHosts()) also when hosts is null; the Hot
> Rod ConfigurationBuilder.parseServers then throws a NullPointerException,
> even when configurationUri or configurationProperties give
> infinispan.client.hotrod.server_list.
> Proposed change: call addServers only when hosts is not empty.
> h4. 2. eventTypes and flags are not trimmed
> {{InfinispanRemoteConsumer.ConsumerHandler.doStart}} (eventTypes) and
> {{InfinispanRemoteConfiguration.setFlags(String)}} split on "," without
> trimming, so "CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_REMOVED" fails
> in valueOf. infinispan-embedded got this fix in CAMEL-27605.
> Proposed change: trim each entry.
> h4. 3. Smaller issues
> {{InfinispanVectorQueryBuilder.build}} calls cache.query(...) twice and
> discards the first result. embeddingStoreEnabled defaults to true, so with
> camel-langchain4j-embeddings on the classpath every infinispan endpoint,
> consumers included, fails to start unless embeddingStoreDimension is set; the
> "producer,advanced" label hides that. With cacheContainer or
> cacheContainerConfiguration set, the embedding marshaller is not set.
> getEmbeddingStoreDimension() returns long, while the field and setter are
> int. The infinispan-embedded doc page has the same outdated query example
> (build(QueryFactory)) that this pull request fixes on the infinispan page.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)