[
https://issues.apache.org/jira/browse/CAMEL-27801?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27801:
--------------------------------
Description:
Found while improving the option descriptions of camel-couchbase for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/800e63636cb5cf151e93037191c087b49ed30169,
pull request https://github.com/apache/camel/pull/31138).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. port and protocol are ignored without connectionString
{{CouchbaseEndpoint}} builds the connection string from the host names only
(hostname + additionalHosts via {{URI.getHost}}), so the {{port}} option
(default 8091) and {{protocol}} are silently ignored; the SDK connects with
{{couchbase://}} on its default port 11210.
Proposed change: deprecate port/protocol in favour of connectionString, or
warn/fail when they are set.
h4. 2. consumerProcessedStrategy=filter does nothing
In {{CouchbaseConsumer.pollWithSqlQuery}} and {{pollWithView}}, filter only
logs at TRACE, so it behaves like none; any unknown value is also treated as
none (no enums).
Proposed change: implement filter (for example with an idempotent repository)
or deprecate it, and add {{enums="none,delete,filter"}}.
h4. 3. producerRetryAttempts is not a number of tries
{{getWriteQueryTimeout()}} = max(attempts*pause, queryTimeout) is used as the
upsert/remove timeout with a BestEffortRetryStrategy whose fixed delay is
producerRetryPause. CCB_GET and the consumer's document read use queryTimeout
(2500 ms) with a retry pause of 5000 ms, so with the defaults they are never
retried; the consumer's remove uses the producer's write timeout.
Proposed change: pass a real retry limit, or rename/document; keep the pause
below the timeout.
h4. 4. queryTimeout and view timeouts
queryTimeout is applied to the SQL++ query only when it is not 2500, so setting
2500 explicitly leaves the SDK's 75 s; view queries never get a timeout from
Camel.
h4. 5. CamelCouchbaseTtl breaks GET and DEL
{{CouchbaseProducer.process}} parses the TTL header with Integer.parseInt for
every operation, so a header that is present but null or not a number also
fails CCB_GET and CCB_DEL.
h4. 6. Smaller issues
autoStartIdForInserts replaces the id for every operation (GET/DEL too); with
scope set but collection unset, KV operations use
{{bucket.defaultCollection()}} while SQL++ queries use the scope;
rangeStartKey/rangeEndKey are put into the SQL++ text without escaping
(route-author values).
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-couchbase for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31138).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. port and protocol are ignored without connectionString
{{CouchbaseEndpoint}} builds the connection string from the host names only
(hostname + additionalHosts via {{URI.getHost}}), so the {{port}} option
(default 8091) and {{protocol}} are silently ignored; the SDK connects with
{{couchbase://}} on its default port 11210.
Proposed change: deprecate port/protocol in favour of connectionString, or
warn/fail when they are set.
h4. 2. consumerProcessedStrategy=filter does nothing
In {{CouchbaseConsumer.pollWithSqlQuery}} and {{pollWithView}}, filter only
logs at TRACE, so it behaves like none; any unknown value is also treated as
none (no enums).
Proposed change: implement filter (for example with an idempotent repository)
or deprecate it, and add {{enums="none,delete,filter"}}.
h4. 3. producerRetryAttempts is not a number of tries
{{getWriteQueryTimeout()}} = max(attempts*pause, queryTimeout) is used as the
upsert/remove timeout with a BestEffortRetryStrategy whose fixed delay is
producerRetryPause. CCB_GET and the consumer's document read use queryTimeout
(2500 ms) with a retry pause of 5000 ms, so with the defaults they are never
retried; the consumer's remove uses the producer's write timeout.
Proposed change: pass a real retry limit, or rename/document; keep the pause
below the timeout.
h4. 4. queryTimeout and view timeouts
queryTimeout is applied to the SQL++ query only when it is not 2500, so setting
2500 explicitly leaves the SDK's 75 s; view queries never get a timeout from
Camel.
h4. 5. CamelCouchbaseTtl breaks GET and DEL
{{CouchbaseProducer.process}} parses the TTL header with Integer.parseInt for
every operation, so a header that is present but null or not a number also
fails CCB_GET and CCB_DEL.
h4. 6. Smaller issues
autoStartIdForInserts replaces the id for every operation (GET/DEL too); with
scope set but collection unset, KV operations use
{{bucket.defaultCollection()}} while SQL++ queries use the scope;
rangeStartKey/rangeEndKey are put into the SQL++ text without escaping
(route-author values).
_Claude Code on behalf of davsclaus_
> camel-couchbase: port/protocol ignored, consumerProcessedStrategy=filter does
> nothing, producerRetryAttempts is not a count
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27801
> URL: https://issues.apache.org/jira/browse/CAMEL-27801
> Project: Camel
> Issue Type: Bug
> Components: camel-couchbase
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-couchbase for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/800e63636cb5cf151e93037191c087b49ed30169,
> pull request https://github.com/apache/camel/pull/31138).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. port and protocol are ignored without connectionString
> {{CouchbaseEndpoint}} builds the connection string from the host names only
> (hostname + additionalHosts via {{URI.getHost}}), so the {{port}} option
> (default 8091) and {{protocol}} are silently ignored; the SDK connects with
> {{couchbase://}} on its default port 11210.
> Proposed change: deprecate port/protocol in favour of connectionString, or
> warn/fail when they are set.
> h4. 2. consumerProcessedStrategy=filter does nothing
> In {{CouchbaseConsumer.pollWithSqlQuery}} and {{pollWithView}}, filter only
> logs at TRACE, so it behaves like none; any unknown value is also treated as
> none (no enums).
> Proposed change: implement filter (for example with an idempotent repository)
> or deprecate it, and add {{enums="none,delete,filter"}}.
> h4. 3. producerRetryAttempts is not a number of tries
> {{getWriteQueryTimeout()}} = max(attempts*pause, queryTimeout) is used as the
> upsert/remove timeout with a BestEffortRetryStrategy whose fixed delay is
> producerRetryPause. CCB_GET and the consumer's document read use queryTimeout
> (2500 ms) with a retry pause of 5000 ms, so with the defaults they are never
> retried; the consumer's remove uses the producer's write timeout.
> Proposed change: pass a real retry limit, or rename/document; keep the pause
> below the timeout.
> h4. 4. queryTimeout and view timeouts
> queryTimeout is applied to the SQL++ query only when it is not 2500, so
> setting 2500 explicitly leaves the SDK's 75 s; view queries never get a
> timeout from Camel.
> h4. 5. CamelCouchbaseTtl breaks GET and DEL
> {{CouchbaseProducer.process}} parses the TTL header with Integer.parseInt for
> every operation, so a header that is present but null or not a number also
> fails CCB_GET and CCB_DEL.
> h4. 6. Smaller issues
> autoStartIdForInserts replaces the id for every operation (GET/DEL too); with
> scope set but collection unset, KV operations use
> {{bucket.defaultCollection()}} while SQL++ queries use the scope;
> rangeStartKey/rangeEndKey are put into the SQL++ text without escaping
> (route-author values).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)