shardingsphere-elasticjob
shardingsphere-elasticjob copied to clipboard
Frequently creation and shutdown cause zookeeper watch to be lost.
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).
https://cwiki.apache.org/confluence/display/CURATOR/TN1
I'm not sure whether this issue is related to #2038. https://github.com/apache/shardingsphere-elasticjob/pull/2132 may help.