[Question] performance problems for decider queue
Hi, I have tried to do a performance test on conductor.
This is the workflow diagram using a fork and join task.
The other tasks are all executed by workers.
The thread pool size of the worker is 800, the task poll interval is 200 and the batch poll count is 20.
I do testing by jmeter. The result is as follows:
I have gone through the data collected by spectator. The queue waiting time and task execution time keep stable.
I viewed the code and found the bottleneck exists in the workflowSweeper. When tasks have been updated, workflows would be moved to decider queue and wait for sweeper to commit to the executor pool. The ability of consumers does not match the producer. In the process of testing, the size of decider queue kept increasing, which made the execution time of workflow kept raising.
I haven tried to increase the executor pool size, but it doesn't make sense.
I have noticed the sweeper thread invokes get of every future returned by the executor thread. Is there any ideas behind this code? Is there any document illustrate that?
In addition, I discovered another problem. In the performance testing, such situation appears.
The whole workflow execution finished while the status kept running. I think the bug still caused by the sweeper code.
Looking forward for your reply! Thanks for your help!
Do you see an exception from conductor-server when the workflow is showing incorrect status?
There is no error
The whole workflow execution finished while the status kept running.
I had the same problem.

@ro9er @peng-w : Can you guys share the workflow and the task definitions (timeout values and retries).
the workflow definition is as follows: { "name": "demo", "description": "demo", "version": 3, "tasks": [ { "name": "dubboTask1", "taskReferenceName": "d1", "type": "SIMPLE", "inputParameters": { } }, { "name": "dubboTask2", "taskReferenceName": "d2", "type": "SIMPLE", "inputParameters": { } }, { "name": "forktask", "taskReferenceName": "forktask", "type": "FORK_JOIN", "inputParameters": { }, "forkTasks": [ [ { "name": "dubboTask3", "taskReferenceName": "d31", "type": "SIMPLE", "inputParameters": { } } ], [ { "name": "dubboTask4", "taskReferenceName": "d32", "type": "SIMPLE", "inputParameters": { } } ] ] }, { "name": "joinTask", "taskReferenceName": "joinTask", "type": "JOIN", "inputParameters": {}, "joinOn":["d31", "d32"] }, { "name": "notifyTask", "taskReferenceName": "d5", "type": "SIMPLE", "inputParameters": { } } ], "inputParameters": [], "schemaVersion": 2 }
One of the take definitions as as follows, others are the same except the task name: [ { "createdBy": "roger", "updatedBy": "roger", "name": "notifyTask", "description": "string", "retryCount": 0, "timeoutSeconds": 0, "inputKeys": [ "string" ], "outputKeys": [ "string" ], "timeoutPolicy": "RETRY", "retryLogic": "FIXED", "retryDelaySeconds": 0, "responseTimeoutSeconds": 0, "concurrentExecLimit": 0, "inputTemplate": {} } ]
1、Metadata -> Tasks [ { "name": "forktask", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask11", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask12", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask21", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "mytask22", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 }, { "name": "jointask", "retryCount": 3, "timeoutSeconds": 1200, "timeoutPolicy": "TIME_OUT_WF", "retryLogic": "FIXED", "retryDelaySeconds": 600, "responseTimeoutSeconds": 3600 } ]
2、Metadata -> Workflow Defs [ { "name": "myworkflow1", "description": "my workflow for test", "version": 1, "tasks": [ { "name": "forktask", "taskReferenceName": "forktask", "type": "FORK_JOIN", "forkTasks": [ [ { "name": "mytask11", "taskReferenceName": "mytask11", "type": "SIMPLE" }, { "name": "mytask12", "taskReferenceName": "mytask12", "type": "SIMPLE" } ], [ { "name": "mytask21", "taskReferenceName": "mytask21", "type": "SIMPLE" }, { "name": "mytask22", "taskReferenceName": "mytask22", "type": "SIMPLE" } ] ] }, { "name": "taskjoin", "taskReferenceName": "taskjoin", "type": "JOIN", "joinOn": [ "mytask12", "mytask22" ] } ], "schemaVersion": 2 } ]
3、Execution
4、The version of conductor is 1.10.4
You mentioned that whole work flow is finished..Can u please provide the workflow input being used..
there's no input and output. its just a demo to test performance
Where did u define the metadata of the tasks ?? Is it in the workflow def?
[ { "createdBy": "roger", "updatedBy": "roger", "name": "notifyTask", "description": "string", "retryCount": 0, "timeoutSeconds": 0, "inputKeys": [ "string" ], "outputKeys": [ "string" ], "timeoutPolicy": "RETRY", "retryLogic": "FIXED", "retryDelaySeconds": 0, "responseTimeoutSeconds": 0, "concurrentExecLimit": 0, "inputTemplate": {} } ]
How was the Json passed as input?
Hi guys, any updates one this, we also met this issue, all tasks finished but workflow showing as RUNNING
Hi Guys, Even we have encountered the same issue where the workflow finished executing all the task successfully but the workflow status is in Running state forever.
We are using version 2.5.2 & MySQL.
Appreciate any help!
We're aware of this issue, and have this on our roadmap. But, we don't have resources to fix this immediately. If anyone would like to take this up in between, please feel free to send in a PR.
This issue to related to https://github.com/Netflix/conductor/issues/871. Closing this, Please continue the discussion forward in #871.
Hi guys,
We are currently running 2.8.1 version here and after running some performance tests using a workflow definition with ten http tasks forked, we had the same issue that was pointed here by @ro9er. Since in #871 there is a PR related already merged on conductor's master, we tought that this problem wouldn't happen again, but it did.
After running our performance test we observed this log on conductor from different threads (workers):
Since #871 identifies two different problems in the same issue (race condition by workers causing incorrect workflow status and same task polled by different workers) I think that this issue is better for continuing the discussion since it only discuss one of that problems (and the one that we are facing here).
Are you guys facing this issue as well? @surajrrao @JasperB @ro9er
We noticed as well that Sweeper is now enabled by default, but how can this help us in this race conditions' cases? (it should help?) @kishorebanala @apanicker-nflx @cyzhao
The whole workflow execution finished while the status kept running. I had the same problem.
what is the url?
@yanghaogn This is a screenshot from the old UI, the new UI does not have a RUNNING tab, rather you can search by RUNNING status on the Executions page and click into the result. 
Thanks for your reply