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

Claus Ibsen updated CAMEL-25822:
--------------------------------
    Fix Version/s: 4.24.0

> camel-aws2-sqs - the DST world fails a rare seed falsely because its drain 
> phase has a fixed length
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25822
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25822
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2-sqs, camel-test
>            Reporter: shashank
>            Assignee: shashank
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> The SQS world shipped with camel-test-dst (CAMEL-25738, 
> {{SqsVisibilityDstTest}} / {{SqsWorld}} in the camel-aws2-sqs tests) ends its 
> drain phase after a fixed virtual time, {{20 * visibilityTimeout + 30}} s 
> after the faults are switched off, and then checks that every sent message 
> was routed and the queue is drained.
> A slow configuration can still be draining when that time runs out. With 
> {{visibilityTimeout=2 maxMessagesPerPoll=1 concurrentConsumers=1 delay=1000}} 
> the consumer takes at most one message per second, and short polling returns 
> fewer messages than asked about half the time. On main, 1 of 20,000 seeds 
> fails this way: seed 9667, {{every offered message is routed at least once: 1 
> never routed: [q/m41]}}, trace hash {{dd65c816de75...}} (the same on two 
> replays). The trace shows a message deleted about every 1.2 s up to the 
> check; the last message would have been deleted 1.1 s after it. Nothing is 
> lost: the failure is the world's, not the consumer's.
> *Fix* (test only): the world drains while it makes progress. It stops when 
> the queue is drained, when no message was deleted for {{20 * 
> visibilityTimeout + 30}} s (the old fixed length, now measured from the last 
> delete), or at a cap of one hour of virtual time. The invariants are 
> unchanged. The guide's snippet of the drain phase ({{test-dst.adoc}} and its 
> catalog copy) shows the new loop.
> *Tests*: seed 9667 passes with the change (same trace hash on two replays). 
> 20,000 seeds: 0 failing (main: 1). Self-check with the CAMEL-25700 fix 
> reverted locally: 1397 of 5000 seeds fail, all "no message is delivered again 
> while the consumer holds it", the same count as before the change.
> _Filed with Claude Code on behalf of allthingssecurity._



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to