[ 
https://issues.apache.org/jira/browse/NIFI-3242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512517#comment-16512517
 ] 

ASF GitHub Bot commented on NIFI-3242:
--------------------------------------

Github user markap14 commented on the issue:

    https://github.com/apache/nifi/pull/2789
  
    @mgaido91 thanks for the fix! The code looks good to me. I do believe it 
addresses the issue. Kinda hard to verify a timing issue but I can verify that 
the logic appears correct and that everything still seems to work. +1 merged to 
master.


> 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
>            Priority: Critical
>
> 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
(v7.6.3#76005)

Reply via email to