You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
前提:当设置了任务组时,提交任务后会进任务组队列,去任务组查看是否有资源可以执行,这个操作是并发的。
所以ProcessServiceImpl.acquireTaskGroup 方法是并发访问的,简化下其流程,就是插入任务组队列记录,检查队列是否有高优等待任务,没有就修改任务状态执行。但因为并发,比如同时提交4个任务,第一个任务在检查高优通过,改状态前,第二个任务进来检查高优任务,会找到第一个任务,然后就等待了,第三、四个任务检查高优时会检查到第二个任务进而等待,导致即使任务组设置可以多个并发,实际还是一个一个串行执行的。
我部署的生产环境已经有了这个问题,最小修改是目前通过在acquireTaskGroup 方法上加synchronized解决。V3.1.4.
Beta Was this translation helpful? Give feedback.
All reactions