-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Description
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);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels