-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(engine): allow exclusive jobs across sub-processes #4146
feat(engine): allow exclusive jobs across sub-processes #4146
Conversation
imports, static imports, spaces, newLines
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
Outdated
Show resolved
Hide resolved
- create / drop - upgrade
c9d161f
to
590308d
Compare
- create / drop - upgrade - use small letter for DDL
`enableExclusivenessAcrossProcessInstances` controls the feature
- Parameterize the query `selectNextJobsToExecute` base on the config `enableExclusivenessAcrossProcessInstances` - When the feature is disabled, the select columns and the selection of exclusive jobs will not consider the new column at all - The legacy query select queries will be preserved when the feature is turned off.
Rename config to `jobExecutorAcquireExclusiveOverProcessHierarchies` - Respects the `jobExecutorAcquire` convention - Emphasizes the feature is about process hierarchies and the application of exclusive jobs there
590308d
to
675a832
Compare
What: - Rename all test cases to better reflect their purpose - Add test for feature disabled - Add java doc and comments - Reformat all test class
- For testing the default legacy acquisition behaviour (parallel execution) of 7.20 processes with multiple hierarchies - For testing the new behaviour of sequential behaviour of 7.20 processes with multiple hierarchies - 7.20 processes will have the new column `rootProcessId` with `null` value in the batch table
# Conflicts: # engine/src/main/resources/org/camunda/bpm/engine/db/upgrade/mssql_engine_7.20_to_7.21.sql
- MariaDB - MySQL - SQLServer
937f133
to
8eb176f
Compare
UpdateContext: Manual testing the feature
|
UpdateAll Pipelines passed: There is no need to wait for the last build since the commit concerns fixing a typo & homogenising the comments in the unit tests |
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/SequentialJobAcquisitionTest.java
Show resolved
Hide resolved
- Extract tests into ExclusiveJobAcquisitionTest & refactor setup / tearDown logic - Extract job executor wait logic into separate JobExecutorWaitUtils class
UpdateContext: The Unit tests were expected to fail with db2 and mssql |
UpdateThe Code Review can proceed in the meantime; the last two points (pipeline build with all-dbs & revert label) can be done in parallel (the approval can wait till the build passes) Assigning to @yanavasileva for a second review round. |
Oracle returns group batches in lists which contain elements in different order. This commit changes the groups from list into sets to avoid the ordering issue for databases which might return elements in different order.
Detected flakiness during oracle run due to clock discrepancy (1h). Adding the clock reset in the class to make it stable
UpdateThe last build using Oracle failed in Context: The HTTL Period expressions in days are affected by the date the tests run. |
07cf324
to
19605e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Nice. I only have suggestions for improvements in the tests.
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Outdated
Show resolved
Hide resolved
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Outdated
Show resolved
Hide resolved
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Outdated
Show resolved
Hide resolved
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Outdated
Show resolved
Hide resolved
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Outdated
Show resolved
Hide resolved
engine/src/test/java/org/camunda/bpm/engine/test/jobexecutor/ExclusiveJobAcquisitionTest.java
Show resolved
Hide resolved
this.repositoryService = engineRule.getRepositoryService(); | ||
this.decisionService = engineRule.getDecisionService(); | ||
this.historyService = engineRule.getHistoryService(); | ||
|
||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context: Fixes Flaky DST issues with this test
Why: The change is not related to this PR but will be committed together since it was identified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to put a note for the fix in the commit message upon merge.
I think the fix for the test is good to go.
Co-authored-by: yanavasileva <yanavasileva@users.noreply.github.com>
- Rename asArrayOfSets method - Remove ProcessEngineState - Reorder & group instance fields to be symmetric
UpdateAll Code review points are addressed. Will assign after a successful build for the final approval. Next steps after approval: Revert the commit in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thank you for considering my feedback. Please wait for the CI before merging.
UpdateAll pipelines passed*
Proceeding to revert the change on stage files and merge. |
This reverts commit 5af9bec.
Related-to: #4004