Skip to content

[Feature][MasterServer] reduce db query operation when process instance running #6891

@caishunfeng

Description

@caishunfeng

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

Now when Master run a workflow, it will do many db operation, which will make Master handle slowly.
Such as a easy dag, contains a shell task, run once and will occur more than 30 db operation: 1 delete, 2 insert, 5 update and 26 select.

I think if Master use memory cache of processInstance and taskInstance, instead of selecting from db every time, it will reduce the db stress and improve the Master handling workflow.

  • when api update process instance or task instance, notify master to refresh and change state.
  • WorkflowExecuteThread as the cache manager for each processInstance, which contains the taskInstances of this workflow.

BTW, I found that the old design TaskInstanceCacheManagerImpl, but it seems never used now.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions