Joseph Percivall created NIFI-3242:
--------------------------------------
Summary: CRON scheduling can occur twice for the same trigger
Key: NIFI-3242
URL: https://issues.apache.org/jira/browse/NIFI-3242
Project: Apache NiFi
Issue Type: Bug
Reporter: Joseph Percivall
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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)