Repository: nifi Updated Branches: refs/heads/master ee87f33ce -> 0d6e81b54
NIFI-1111: We were subtracting values in the wrong order so that we always would 'yield' for a negative amount of time, which equated to not yielding at all. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/1a388f95 Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/1a388f95 Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/1a388f95 Branch: refs/heads/master Commit: 1a388f957e286d394ad11c0b5f192ddf23f7c92b Parents: 98f5a1a Author: Mark Payne <[email protected]> Authored: Wed Nov 4 16:30:20 2015 -0500 Committer: Mark Payne <[email protected]> Committed: Fri Nov 6 09:03:38 2015 -0500 ---------------------------------------------------------------------- .../nifi/controller/scheduling/TimerDrivenSchedulingAgent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/1a388f95/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/TimerDrivenSchedulingAgent.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/TimerDrivenSchedulingAgent.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/TimerDrivenSchedulingAgent.java index c4e6609..96cee20 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/TimerDrivenSchedulingAgent.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/scheduling/TimerDrivenSchedulingAgent.java @@ -127,7 +127,7 @@ public class TimerDrivenSchedulingAgent implements SchedulingAgent { // after the yield has expired. final long newYieldExpiration = connectable.getYieldExpiration(); if (newYieldExpiration > System.currentTimeMillis()) { - final long yieldMillis = System.currentTimeMillis() - newYieldExpiration; + final long yieldMillis = newYieldExpiration - System.currentTimeMillis(); final ScheduledFuture<?> scheduledFuture = futureRef.get(); if (scheduledFuture == null) { return;
