Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
Initially brought up in this message[1] to the user list.
The logic for CRON scheduling is done here[2]. The CRON expression is evaluated and used to check when to schedule the next trigger[3]. I believe problems arise due to the approximate nature of the java scheduler and potentially the millisecond portion of quartz scheduler getting wiped here[4] can lead to the behavior seen in the mailing list (an extra invocation right before the correct time).
[1] http://mail-archives.apache.org/mod_mbox/nifi-users/201612.mbox/%3C1482106268095-481.post%40n4.nabble.com%3E
[2] https://github.com/apache/nifi/blob/c10d11d378ffd7c3044446830e24d50c5befc98a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/QuartzSchedulingAgent.java#L177-L177
[3] https://github.com/apache/nifi/blob/c10d11d378ffd7c3044446830e24d50c5befc98a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/QuartzSchedulingAgent.java#L180
[4] https://github.com/quartz-scheduler/quartz/blob/quartz-2.2.1/quartz-core/src/main/java/org/quartz/CronExpression.java#L1170
Attachments
Issue Links
- is duplicated by
-
NIFI-3271 GenerateFlowFile processor creates duplicates with CRON scheduling strategy and Primary node only execution
- Resolved
- links to