shardingsphere-elasticjob icon indicating copy to clipboard operation
shardingsphere-elasticjob copied to clipboard

Frequently creation and shutdown cause zookeeper watch to be lost.

Open xlcn opened this issue 1 year ago • 1 comments

Bug Report

Which version of ElasticJob did you use?

master

Which project did you use? ElasticJob-Lite or ElasticJob-Cloud?

ElasticJob-Lite

Expected behavior

every event in zookeeper, client can watch it, otherwise exception occur

Actual behavior

frequently create and shutdown Immediately,watch lost

Reason analyze (If you can)

project has 12 listener now, every one can watch event, but single thread pool core size is not enough, when job shutdown, shudownListener maybe execute over first, but GuaranteeListener maybe not get complete signal,lead to AbstractDistributeOnceElasticJobListener appear timeout exception,so should be increament core size to avoid watch loss.

Steps to reproduce the behavior.

extends a AbstractDistributeOnceElasticJobListener, set complete or start timeout, Frequently creation and shutdown some job

Example codes for reproduce this issue (such as a github link).

xlcn avatar Sep 01 '22 03:09 xlcn

https://cwiki.apache.org/confluence/display/CURATOR/TN1

TeslaCN avatar Oct 12 '22 06:10 TeslaCN

I'm not sure whether this issue is related to #2038. https://github.com/apache/shardingsphere-elasticjob/pull/2132 may help.

TeslaCN avatar Oct 17 '22 09:10 TeslaCN