[improve] different bookies do not trigger gcOverreplicatedLedger at the same time
Motivation
In the gcOverReplicatedLedger function, there is a config gcOverreplicatedLedgerMaxConcurrentRequests to control the zk concurrent request of one bookie, which aim to avoid too much pressure on zk.
However, if we have so much bookies, and different bookies start at similar time, different bookies would trigger gcOverreplicatedLedger at the same time. This make the request pressure on zk become maxConcurrentRequests * bookieNums.
I think we can improve this process, make different bookies not trigger gcOverreplicatedLedger at the same time. So that we can avoid gcOverreplicatedLedgerMaxConcurrentRequests be a very small value.
Changes
define lastOverReplicatedLedgerGcTimeMillis based on the bookie start time + gcOverReplicatedLedgerIntervalMillis * randomly factor or the bookie start time - gcOverReplicatedLedgerIntervalMillis * randomly factor
Thanks for your contribution. I have triggered the CI. BTW, how many bookies do you maintain?
Thanks for your contribution. I have triggered the CI. BTW, how many bookies do you maintain?
The largest cluster contains 400+ bookies.
Have fixed the test. Can you trigger CI again, thx. @shoothzj @hangc0276 @jiazhai