You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/02/25 09:44:04 UTC

[GitHub] [shardingsphere-elasticjob] nevenchen opened a new issue #1840: New instance not able to trigger resharding

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


   
   VERSION: 3.0.0.rc1
   Project: ElasticJob-Lite
   
   ### Expected behavior:
   I have a job in my app deployed with 2 node.
   The job set 3 the config 'sharding-total-count' to 3.
   I start one node first, when all 3 sharding job run on the node.
   I start the second node.
   
   The "job-sharding-strategy-class" left as defult.
   After the second node start, I think the second node should take at lease one sharding job.
   That means:
   Node1: Take 2 thread to run the job.
   Node2: Take 1 thread to run the job.
   
   ### Actual behavior:
   Node1: Take 3 thread to run the job.
   Node2: Take 0 thread to run the job.
   
   ### Reason analyze (If you can)
   The ReconcileService is going to see whether a resharding need: 
   ` protected void runOneIteration() {
           int reconcileIntervalMinutes = configService.load(true).getReconcileIntervalMinutes();
           if (reconcileIntervalMinutes > 0 && (System.currentTimeMillis() - lastReconcileTime >= reconcileIntervalMinutes * 60 * 1000)) {
               lastReconcileTime = System.currentTimeMillis();
               if (!shardingService.isNeedSharding() && shardingService.hasShardingInfoInOfflineServers()) {
                   log.warn("Elastic Job: job status node has inconsistent value,start reconciling...");
                   shardingService.setReshardingFlag();
               }
           }
       }`
   
   It find all item from "instances" node in ZK:
   In my case, it is: {10.37.27.20@-@17912, 10.37.27.20@-@18540}
   
   Then for each of those value, to compare whit the sharding job items in ZK node "sharding",
   In my case, the values are: {0: 10.37.27.20@-@17912, 1: 10.37.27.20@-@17912, 2: 10.37.27.20@-@17912 }
   
   As all value from "sharding" are equals with 10.37.27.20@-@17912 from "instances", the resharding with not bee trigger.
   I with make the second app node neven have a chance to take the sharding job item.
   
   ### Steps to reproduce the behavior.
   
   ### Example codes for reproduce this issue (such as a github link).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] TeslaCN commented on issue #1840: New instance not able to trigger resharding

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #1840:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1840#issuecomment-787080948


   Hi @nevenchen 
   Could you dump your data in Zookeeper?
   Refer to https://shardingsphere.apache.org/elasticjob/current/en/user-manual/elasticjob-lite/operation/dump/


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere-elasticjob] jingting-zhang commented on issue #1840: New instance not able to trigger resharding

Posted by GitBox <gi...@apache.org>.
jingting-zhang commented on issue #1840:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1840#issuecomment-1066566244


   @TeslaCN elastic-job不支持新增实例后立即再分片(把已分配但未执行的分片重新分配给新增的实例),只能等下次执行周期再重新分片。这个能否支持,有无必要支持?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org