Revert "Fix cron id collision bug by avoiding state in Quartz jobs"
authorJordan Ly <jordan.ly8@gmail.com>
Tue, 27 Feb 2018 18:18:46 +0000 (10:18 -0800)
committerJordan Ly <jly@twitter.com>
Tue, 27 Feb 2018 18:18:46 +0000 (10:18 -0800)
commite3f496a65eae03dde0392627f3fcde7b93a82df9
tree4203c5fa186b51c2b3ab93906e62790b417c6d71
parentd95fc2ff92ddb7eb2c4054c311fcfe9cc24319d2
Revert "Fix cron id collision bug by avoiding state in Quartz jobs"

This reverts commit e2ea191473397691605602c6e40c6aad8a56d81a.

A bug was found where jobs that were killed via the KILL_EXISTING flag would set `path` as `null` in
`JobDataMap` that would block concurrent runs, but that value would never be set to `key` after the
the delayed run finished because it would run outside of the `Job` execution.

The issue in https://reviews.apache.org/r/65680/ will occur again, but it is rare and has been
around for a few years.

This bug was not caught in the unit test `testKillExisting` because `executeWithReplay` is mocked
and runs synchronously within the `Job` execution, allowing the `key` to be persisted.

Reviewed at https://reviews.apache.org/r/65810/
src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java
src/test/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJobTest.java