-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sharding: balance shards waiting lists with shuffled out nodes #2950
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2950 +/- ##
==========================================
+ Coverage 75.01% 75.02% +0.01%
==========================================
Files 620 620
Lines 59062 59086 +24
==========================================
+ Hits 44305 44329 +24
Misses 10803 10803
Partials 3954 3954
Continue to review full report at Codecov.
|
sharding/hashValidatorShuffler.go
Outdated
err = distributeValidators(newWaiting, arg.newNodes, arg.randomness) | ||
|
||
err = distributeValidators(newWaiting, arg.newNodes, arg.randomness, false) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
sharding/hashValidatorShuffler.go
Outdated
@@ -657,6 +706,9 @@ func (rhs *randHashShuffler) UpdateShufflerConfig(epoch uint32) { | |||
"epochEnable", rhs.activeNodesConfig.EpochEnable, | |||
"maxNodesToShufflePerShard", rhs.activeNodesConfig.NodesToShufflePerShard, | |||
) | |||
|
|||
rhs.flagBalanceWaitingLists.Toggle(epoch >= rhs.balanceWaitingListsEnableEpoch) | |||
log.Trace("balanced waiting lists", "enabled", rhs.flagBalanceWaitingLists.IsSet()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Debug as to align with the rest of the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed
with activation of capped shuffling of nodes, the shards waiting lists may become unbalanced
this may cause waiting times to differ between shards waiting lists
this PR will try at the end of each epoch to first equalize the waiting lists.