Claus Ibsen created CAMEL-27945:
-----------------------------------

             Summary: camel-aws2-athena: retries reuse the clientRequestToken, 
outputLocation is required when Athena does not need it
                 Key: CAMEL-27945
                 URL: https://issues.apache.org/jira/browse/CAMEL-27945
             Project: Camel
          Issue Type: Bug
          Components: camel-aws2
            Reporter: Claus Ibsen
             Fix For: 4.25.0


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

h4. 1. Retries reuse the clientRequestToken
{{Athena2Producer.startQueryExecution}} / doStartQueryExecution send the same 
clientRequestToken (option or CamelAwsAthenaClientRequestToken header) on every 
attempt when retry is set and maxAttempts > 1. Athena treats a repeated token 
as the same request, returns the same failed query execution id and starts no 
new query, so a retry only polls the old failed query again.
Proposed change: send the configured token only on the first attempt, or append 
the attempt number.

h4. 2. outputLocation is required when Athena does not need it
{{Athena2Producer.determineOutputLocation}} fails with "AWS Athena output 
location is required." when neither the option nor the header is set, while 
Athena accepts a query without one when the workgroup defines a location or 
managed query results are used.
Proposed change: set ResultConfiguration.outputLocation only when a location is 
given.

h4. 3. Smaller issues
{{Athena2QueryHelper.doWait}}: initialDelay only applies before the first 
status check of the first attempt, as markAttempt never resets currentDelay 
(the option text now says so). Athena2Component.createEndpoint rejects an 
endpoint with no credentials option and no client, so the SDK default 
credentials chain fallback in AwsClientBuilderUtil is never reached. 
waitTimeout, initialDelay and delay have no producer label; 
useDefaultCredentialsProvider has no defaultValue; retry has defaultValue 
"never" while the field is null. The doc section "Required Athena component 
options" does not list useDefaultCredentialsProvider, 
useProfileCredentialsProvider and useSessionCredentials.


_Claude Code on behalf of davsclaus_



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

Reply via email to