Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Improve PeriodicBatchEntityTrigger Workflows performance #18664

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

IceS2
Copy link
Contributor

@IceS2 IceS2 commented Nov 15, 2024

In order to Increase the performance of the Flowable Workflows (Mainly for the PeriodicBatchEntityTrigger), we are:

  • Updating the default Async Executor Flowable configurations to handle more workload
    The default configurations are pretty bad for an asset intensive production environment and thus we are updating them.

  • Refactoring how we call the MainWorkflow from the TriggerWorkflow
    We are now relying on CallActivity to call the MainWorkflow instead of doing it programatically through a JavaDelegate on a ServiceTask.

    This is pretty important for the PeriodicBatchEntityTrigger, where we are now relying on MultiInstanceLoopCharacteristics for the concurrent task execution instead of dealing with it manually.

    It is a BPMN2.0 natural way of solving this issues that I didn't realized it would work for a whole workflow before.

    As a plus, it also takes care of waiting for the MainWorkflow to finish before finishing the TriggerWorkflow.

  • Small fix to avoid patching an Entity if the updated Certification would be the same as the one they currently have.

Type of change:

  • Improvement

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@IceS2 IceS2 changed the title MINOR: Update default configurations MINOR: Improve PeriodicBatchEntityTrigger Workflows performance Nov 16, 2024
Copy link

sonarcloud bot commented Nov 16, 2024

@IceS2
Copy link
Contributor Author

IceS2 commented Nov 17, 2024

The test that is failing for the CI is being fixed here: https://github.com/open-metadata/OpenMetadata/pull/18640/files

@@ -40,6 +40,10 @@ private WorkflowHandler(OpenMetadataApplicationConfig config) {
ProcessEngineConfiguration processEngineConfiguration =
new StandaloneProcessEngineConfiguration()
.setAsyncExecutorActivate(true)
.setAsyncExecutorCorePoolSize(50)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these be configurable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they should, but we can iterate on that after having a decent default for production load.
I was thinking about having a Workflows Setting kind of thing within the OpenMetadata settings.
What do you think?

@pmbrull pmbrull merged commit 231025d into main Nov 18, 2024
13 of 19 checks passed
@pmbrull pmbrull deleted the update-flowable-configuration branch November 18, 2024 07:17
IceS2 added a commit that referenced this pull request Nov 18, 2024
* Update default configurations

* Refactor how we call the main Workflow in order to increase performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants