InFlightLongPollingActivateJobsRequestsState#activeRequestsToBeRepeated
contains duplicates
#8390
Labels
kind/bug
Categorizes an issue or PR as a bug
scope/gateway
Marks an issue or PR to appear in the gateway section of the changelog
Describe the bug
See description in #8310:
Scenario 1: Duplicates in
activeRequestsToBeRepeated
when other requests succeedsGiven three activate requests
x
,y
, andz
:z
to broker -> currentactiveRequests = [ z ]
andactiveRequestsToBeRepeated = [ ]
y
to broker -> currentactiveRequests = [ z, y ]
andactiveRequestsToBeRepeated = [ ]
x
to broker -> currentactiveRequests = [ z, y, x ]
andactiveRequestsToBeRepeated = [ ]
z
completes with at least one activated job -> reset failed attempts -> currentactiveRequests = [ y, x ]
andactiveRequestsToBeRepeated = [ y, x ]
y
completes with at least one activated job -> reset failed attempts -> currentactiveRequests = [ x ]
andactiveRequestsToBeRepeated = [ x, x ]
Scenario 2: Duplicates in
activeRequestsToBeRepeated
on multiple notificationsGiven is a request
x
:x
to broker -> currentactiveRequests = [ x ]
andactiveRequestsToBeRepeated = [ ]
activeRequests = [ x ]
andactiveRequestsToBeRepeated = [ x ]
activeRequests = [ x ]
andactiveRequestsToBeRepeated = [ x, x ]
Scenario 3: Another request wins
Given are requests
[z1, z2, z3, ...., zn]
andx
:[z1, z2, z3, ...., zn]
andx
-> currentactiveRequests = [ z1, z2, z3, ...., zn, x ] and
activeRequestsToBeRepeated = [ ]`z1
completes with at least one activated job -> reset failed attempts -> currentactiveRequests = [ z2, z3, ...., zn, x ]
andactiveRequestsToBeRepeated = [ z2, z3, ...., zn, x ]
x
completes without any jobs -> retry request -> currentactiveRequests = [ z2, z3, ...., zn, x ]
andactiveRequestsToBeRepeated = [ z2, z3, ...., zn ]
z2
completes with at least one activated job -> reset failed attempts -> currentactiveRequests = [ z3, ...., zn, x ]
andactiveRequestsToBeRepeated = [ z3, ...., zn, x ]
x
completes without any jobs -> retry request -> currentactiveRequests = [ z3, ...., zn, x ]
andactiveRequestsToBeRepeated = [ z2, z3, ...., zn ]
In all scenarios, the queue
activeRequestsToBeRepeated
contains the requestx
at least once before the response arrives. In a nutshell, as long as the failed attempts are lower than the configured threshold and the requestx
is present in the queue of repeatable requests, the requestx
is executed in a loop when it responds with any activated job.Expected behavior
InFlightLongPollingActivateJobsRequestsState#activeRequestsToBeRepeated
does not contain duplicatesEnvironment:
is depended on by #8310
The text was updated successfully, but these errors were encountered: