bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

[improve] different bookies do not trigger gcOverreplicatedLedger at the same time

Open TakaHiR07 opened this issue 1 year ago • 3 comments

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

TakaHiR07 avatar Apr 25 '24 04:04 TakaHiR07

Thanks for your contribution. I have triggered the CI. BTW, how many bookies do you maintain?

hezhangjian avatar Apr 26 '24 07:04 hezhangjian

Thanks for your contribution. I have triggered the CI. BTW, how many bookies do you maintain?

The largest cluster contains 400+ bookies. image

TakaHiR07 avatar Apr 26 '24 07:04 TakaHiR07

Have fixed the test. Can you trigger CI again, thx. @shoothzj @hangc0276 @jiazhai

TakaHiR07 avatar May 09 '24 09:05 TakaHiR07