[ 
https://issues.apache.org/jira/browse/CAMEL-27795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-27795:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-qdrant for CAMEL-23832 
(commit 
https://github.com/apache/camel/commit/8a5ecaf41ffca0f81f3d680155485d5214951a59,
 pull request https://github.com/apache/camel/pull/31137).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. An Integer or String CamelQdrantPointId gives a NullPointerException
In {{QdrantEmbeddingsDataTypeTransformer.transform}}, {{getHeader(POINT_ID, 
supplier, PointId.class)}} returns null for an Integer or String header (only 
Long, UUID and PointId convert, tested), and 
{{PointStruct.Builder.setId(null)}} throws. The Qdrant example of 
langchain4j-embeddings-component.adoc ({{.constant(1)}}, {{expression: 1}}) 
hits this.
Proposed change: QdrantConverter methods from Integer and String (a number or a 
UUID) to PointId.

h4. 2. An exception in the response handler hangs the exchange
In {{QdrantProducer}}, the BiConsumer passed to {{call()}} runs inside 
{{FutureCallback.onSuccess}}. If it throws (for example 
{{UpdateStatus.UNRECOGNIZED.getNumber()}} when a newer server returns an 
unknown status), {{callback.done}} is never called and the exchange hangs.
Proposed change: try/catch that sets the exception, with callback.done in 
finally.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-qdrant for CAMEL-23832 
(pull request https://github.com/apache/camel/pull/31137).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. An Integer or String CamelQdrantPointId gives a NullPointerException
In {{QdrantEmbeddingsDataTypeTransformer.transform}}, {{getHeader(POINT_ID, 
supplier, PointId.class)}} returns null for an Integer or String header (only 
Long, UUID and PointId convert, tested), and 
{{PointStruct.Builder.setId(null)}} throws. The Qdrant example of 
langchain4j-embeddings-component.adoc ({{.constant(1)}}, {{expression: 1}}) 
hits this.
Proposed change: QdrantConverter methods from Integer and String (a number or a 
UUID) to PointId.

h4. 2. An exception in the response handler hangs the exchange
In {{QdrantProducer}}, the BiConsumer passed to {{call()}} runs inside 
{{FutureCallback.onSuccess}}. If it throws (for example 
{{UpdateStatus.UNRECOGNIZED.getNumber()}} when a newer server returns an 
unknown status), {{callback.done}} is never called and the exchange hangs.
Proposed change: try/catch that sets the exception, with callback.done in 
finally.


_Claude Code on behalf of davsclaus_


> camel-qdrant: an Integer or String point id gives an NPE, an exception in a 
> response handler hangs the exchange
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27795
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27795
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-qdrant
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-qdrant for CAMEL-23832 
> (commit 
> https://github.com/apache/camel/commit/8a5ecaf41ffca0f81f3d680155485d5214951a59,
>  pull request https://github.com/apache/camel/pull/31137).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. An Integer or String CamelQdrantPointId gives a NullPointerException
> In {{QdrantEmbeddingsDataTypeTransformer.transform}}, {{getHeader(POINT_ID, 
> supplier, PointId.class)}} returns null for an Integer or String header (only 
> Long, UUID and PointId convert, tested), and 
> {{PointStruct.Builder.setId(null)}} throws. The Qdrant example of 
> langchain4j-embeddings-component.adoc ({{.constant(1)}}, {{expression: 1}}) 
> hits this.
> Proposed change: QdrantConverter methods from Integer and String (a number or 
> a UUID) to PointId.
> h4. 2. An exception in the response handler hangs the exchange
> In {{QdrantProducer}}, the BiConsumer passed to {{call()}} runs inside 
> {{FutureCallback.onSuccess}}. If it throws (for example 
> {{UpdateStatus.UNRECOGNIZED.getNumber()}} when a newer server returns an 
> unknown status), {{callback.done}} is never called and the exchange hangs.
> Proposed change: try/catch that sets the exception, with callback.done in 
> finally.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to