txm119161336 opened a new issue, #2490:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2490
As i see , currently if we have one job that is misfired ,the quartz
framework will trigger the job after the current job is finised , meanwhile you
have trigger listener to setup misfired info to zookeeper ,which means the
misfired job may execute twice,one of which is quartz framework trigger,the
other one of which is you have missfire loop after job execution logic. So
that is to say ,the job will misfire twice,is that a problem?
executionService.cleanPreviousExecutionInfo(); //清理上次分片的标记信息
executeJobInternal(shardingContext); // first execution
log.debug("Elastic job: execute normal completed, sharding
context:{}.", shardingContext);
while (configService.isMisfire() &&
!executionService.getMisfiredJobItems(shardingContext.getShardingItems()).isEmpty()
&& !stoped && !shardingService.isNeedSharding()) {
log.debug("Elastic job: execute misfired job, sharding
context:{}.", shardingContext);
//将 execution/{item}/misfire节点删除
executionService.clearMisfire(shardingContext.getShardingItems());
executeJobInternal(shardingContext); //second execution
log.debug("Elastic job: misfired job completed, sharding
context:{}.", shardingContext);
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]