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
Exclusive jobs across sub process instances #4003
Labels
type:feature
Issues that add a new user feature to the project.
version:7.21.0-alpha5
version:7.21.0
Comments
danielkelemen
added
type:feature
Issues that add a new user feature to the project.
potential:7.21.0
labels
Dec 11, 2023
I am interested in doing the review. :) |
This was referenced Mar 5, 2024
Closed
Notes for the Reviewer
Since @yanavasileva expressed already interest to conduct the code review, after agreeing also with @danielkelemen, it makes sense for another person to review the code besides the ones who took part in the design / implementation phases so i'm assigning the ticket to her for the code review 🚀 |
psavidis
added a commit
that referenced
this issue
Mar 22, 2024
Context: Exclusive jobs that originate from process hierarchies (processes which contain multi-instance subprocesses) can now be executed exclusively. Why: The exclusive execution would only be applied on tasks that originate at a root level. Any subprocess spawned by root processes would not be correlated and considered for exclusive execution. Changes: See below the changes of this feature - New column `ROOT_PROC_INST_ID_ ` is introduced to correlated a process instance with its root parent - The column is added to all supported databases & `7.20_to_7.21` migration scripts. - The query `selectNextJobsToExecute` is enriched to consider the root process instance id when the feature is enabled. - The feature flag `jobExecutorAcquireExclusiveOverProcessHierarchies` enables / disables the feature. - The feature is disabled by default for backwards compatibility with the legacy behaviour. Tests: - Unit tests under `ExclusiveJobAcquisitionTest` which cover: - Legacy behaviour with the feature disabled - Feature behaviour with the feature enabled & a 1-level deep process hierarchy (process which spawns a subprocess) - Feature behaviour with the feature enabled & a 2-level deep process hierarchy (process which spawns a subprocess - which spawns another subprocess) - Migration tests under `ExclusiveOverProcessHierarchiesTest` which cover: - How the job acquisition and execution (see `AcquireJobsCmd`) behave with existing 7.20 process instances when the feature is disabled (legacy behaviour and backwards compatibility) - How the job acquisition and execution (see `AcquireJobsCmd`) behave with existing 7.20 process instances when the feature is enabled (feature behaviour) - The tests need to select all the jobs and lock them to perform their logic. After the test execution the jobs are unlocked. Other Notable Changes: - Fixed flakiness of `DecisionDefinitionTest` - The Test class was susceptible to timezone changes due its test data using the current date; as a result, depending on the date of execution, changing to DST could fail the tests. - This behaviour is fixed by adjusting the test data to use a fixed past date, rendering the test executions immune to date of execution. - The waiting behaviour on jobs for the tests to rely on the scheduler, shared by `SequentialJobAcquisitionTest`, `ExclusiveJobAcquisitionTest` is extracted into class `JobExecutorWaitUtils` Co-authored-by: daniel.kelemen Co-authored-by: yanavasileva Co-authored-by: petros.savvidis Related-to: #4004 , #4003
psavidis
added a commit
to camunda/camunda-docs-manual
that referenced
this issue
Mar 22, 2024
Context: Documentation on the following: - How exclusive jobs of process hierarchies behave by default - The feature that enables exclusive execution over hierarchies - New feature flag configuration The commit adds an image(png) that demonstrates the limited application of `exclusive` on a hierarchical process setup. Co-authored-by: yanavasileva Co-authored-by: petros.savvidis Related-to: - camunda/camunda-bpm-platform#4003 - camunda/camunda-bpm-platform#4005
Merged code & documentation to |
Notes for QA Testing
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type:feature
Issues that add a new user feature to the project.
version:7.21.0-alpha5
version:7.21.0
User Story (Required on creation)
As a developer, I want to use an exclusive continuation for tasks in a multi-instance sub-process use-case to ensure exclusive tasks are not executed in parallel.
Functional Requirements (Required before implementation)
rootProcessInstanceId
, allowing it to respect exclusiveness in tasks across sub-process instances.Technical Requirements (Required before implementation)
See tickets.
Limitations of Scope
Hints
Links
Breakdown
Tasks
rootProcessInstanceId
#4004Dev2QA handover
The text was updated successfully, but these errors were encountered: