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:
[email protected]