[
https://issues.apache.org/jira/browse/CAMEL-13722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878555#comment-16878555
]
Camel commented on CAMEL-13722:
-------------------------------
Same problem with 2.24.1. I'm already using zookeeper-master component. The log
is a bit different in newest version:
10:51:33 [DefaultQuartzScheduler-camel-1_Worker-1] DEBUG
org.quartz.core.JobRunShell Calling execute on job foobar
10:51:33 [DefaultQuartzScheduler-camel-1_Worker-1] DEBUG
o.a.camel.component.quartz2.CamelJob Running CamelJob
jobExecutionContext=JobExecutionContext: trigger: 'foobar job: foobar fireTime:
'Thu Jul 04 10:51:33 UTC 2019 scheduledFireTime: Thu Jul 04 10:51:33 UTC 2019
previousFireTime: 'null nextFireTime: Fri Jul 05 10:45:00 UTC 2019
isRecovering: false refireCount: 0
10:51:33 [DefaultQuartzScheduler-camel-1_Worker-1] DEBUG
o.a.camel.component.quartz2.CamelJob Looking up existing QuartzEndpoint with
triggerKey=foobar
10:51:33 [main-SendThread(zookeeper:2181)] DEBUG
org.apache.zookeeper.ClientCnxn Got notification sessionid:0x16ab617c3060e83
10:51:33 [pool-5-thread-1] DEBUG o.a.c.c.z.ZookeeperGroupListenerSupport
Master/Standby endpoint is Master for:
quartz2://foobar?cron=0+45+10+%3F+*+MON-FRI in CamelContext(camel-1)
Note that specified cron time is 10:45 and 'scheduledFireTime: Thu Jul 04
10:51:33' in log. What does scheduledFireTime means and how is it calculated?
> Quartz job paused, but not resumed after zookeeper connection recovery leads
> to job misfire
> -------------------------------------------------------------------------------------------
>
> Key: CAMEL-13722
> URL: https://issues.apache.org/jira/browse/CAMEL-13722
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz2
> Affects Versions: 2.22.0
> Reporter: Camel
> Priority: Major
>
> We have 2 instances of route coordinated by zookeeper with MasterRoutePolicy.
> If zookeeper is disconnected, the quartz job is paused and left in that state
> after connection recovery. Later on, if another node shuts down, current node
> with paused job starts the route, despite wrong time.
> How to reproduce:
> # Run 2 instances with MasterRoutePolicy for leader selection connected to
> zookeeper with route
> from("quartz2://foobar?cron=0+0+15+?+*+MON-FRI").log("start");
> # Simulate zookeeper disconnect (pull net cable etc.) on non-master ->
> Trigger is set to Paused. Log:
> [Curator-ConnectionStateManager-0]
> org.apache.camel.component.quartz2.QuartzEndpoint: Pausing trigger foobar
> # Reconnect to zookeeper
> # Master node successfully runs the scheduled job, wait 5 min
> # Shutdown master node -> the second node triggers the job even though it
> was already executed on master and cron time is in the past
> Expected behavior is to skip running missed job in step 5.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)