Bug: timeoutSeconds / responseTimeoutSeconds not making task re-scheduled
See original GitHub issueHello,
I tried to use responseTimeoutSeconds but task never gets re-scheduled for another processing.
I also tried with timeoutSeconds instead of responseTimeoutSeconds- and got the same behavior. also note that when I tried timeoutSeconds, and looked in the UI at the json of the task, it didn’t specify “timeoutSeconds” there. in addition, in the docs it says “Time in milliseconds” even though the name suggests its “seconds” … so one of them is probably wrong or misleading
for your convenience, here are the exact curl commands to reproduce the bug:
- create the task definition
curl -X POST \
http://localhost:8080/api/metadata/taskdefs \
-H 'Content-Type: application/json' \
-d '[
{
"name": "retry-task",
"retryCount": 1,
"responseTimeoutSeconds": 10,
"inputKeys": ["date"],
"outputKeys": ["year"],
"timeoutPolicy": "RETRY",
"retryLogic": "FIXED",
"retryDelaySeconds": 0
}
]'
- create the workflow definition
curl -X POST \
http://localhost:8080/api/metadata/workflow \
-H 'Content-Type: application/json' \
-d '{
"name": "retry-task",
"description": "Gets date and returns year from it",
"version": 1,
"tasks": [
{
"name": "retry-task",
"taskReferenceName": "retry-task",
"type": "SIMPLE",
"inputParameters": {
"date": "${workflow.input.date}"
}
}
],
"outputParameters": {
},
"schemaVersion": 2
}'
- start a new workflow instance
curl -X POST \
http://localhost:8080/api/workflow/retry-task \
-H 'Content-Type: application/json' \
-d '{"date": "1800-01-01"}'
- poll pending task as worker (move it to IN_PROGRESS)
curl -X GET \
'http://localhost:8080/api/tasks/poll/batch/retry-task?count=1&timeout=1000&workerid=postman' \
-H 'Content-Type: application/json' \
- send ack as worker (take task id from previous response)
curl -X POST \
http://localhost:8080/api/tasks/e134b6c8-7221-42a4-ab2f-9c3c382ab14a/ack \
-H 'Content-Type: application/json' \
- no matter how much time I wait, task is still in status IN_PROGRESS, and if I repeat step (4) to poll pending tasks I get an empty response
If i can do anything else to help investigate this, please let me know
my required flow is as follows:
task is polled by worker worker sends ack that he received the task worker machine crashes worker come back to life after 10 seconds without any result status of ‘COMPLETED’, the task would be retried task is polled (again) by worker … … this process would happen again and again up to 3 times, or until ‘COMPLETED’ status is reported
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
@kishorebanala I restarted it, issue gone😓
@77yang Can you provide more details to help reproduce this please? cc: @apanicker-nflx