sergehuber opened a new pull request, #830: URL: https://github.com/apache/unomi/pull/830
## Plain-language summary Unomi can run the same background job on more than one node at once, or leave a job stuck after a node stops. That makes exclusive work unsafe in a cluster. This PR fixes those lock and recovery races and adds stronger unit tests so the bugs stay fixed. ## What changed * Stop a node from clearing another node's valid task lock on release or completion * Make crash recovery mark failed work without starting it again on non-executor nodes (unless the task is meant to run on all nodes) * Default new tasks to exclusive execution; opt in to parallel with an explicit API; `runOnAllNodes` turns parallel on automatically * Clear locks and mark CRASHED when shutdown happens after a task was prepared * Harden the in-memory test persistence copy/OCC behavior used by multi-node tests * Expand manager and multi-node unit tests; document scheduler states and locks in the manual ## Test plan - [x] `mvn -pl services surefire:test -Dtest=TaskLockManagerTest,TaskExecutionManagerTest,TaskRecoveryManagerTest,PersistenceSchedulerProviderTest,SchedulerServiceClusterRaceTest,SchedulerServiceImplTest,TaskStateManagerTest,TaskValidationManagerTest,TaskMetricsManagerTest,TaskHistoryManagerTest` - [ ] CI on this PR ## References * https://issues.apache.org/jira/browse/UNOMI-967 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
