Technoboy- opened a new issue #1388:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1388


   When job need to be sharded,  other nodes(not leader) need to wait for 
sharding to complete.
   ```
       private void blockUntilShardingCompleted() {
           while (!leaderService.isLeaderUntilBlock() && 
(jobNodeStorage.isJobNodeExisted(ShardingNode.NECESSARY) || 
jobNodeStorage.isJobNodeExisted(ShardingNode.PROCESSING))) {
               log.debug("Job '{}' sleep short time until sharding completed.", 
jobName);
               BlockUtils.waitingShortTime();  //sleep 100ms
           }
       }
       
       private void waitingOtherShardingItemCompleted() {
           while (executionService.hasRunningItems()) {
               log.debug("Job '{}' sleep short time until other job 
completed.", jobName);
               BlockUtils.waitingShortTime(); //sleep 100ms
           }
       }
   ```
   I wonder if the job is scheduled by second, it will cause at least 100ms 
delay. Should we change it to 30ms or other values ?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to