Skip to content

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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TakaHiR07
Copy link
Contributor

@TakaHiR07 TakaHiR07 commented Apr 25, 2024

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

@hezhangjian
Copy link
Member

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

@TakaHiR07
Copy link
Contributor Author

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

The largest cluster contains 400+ bookies.
image

@TakaHiR07 TakaHiR07 force-pushed the different_bookie_trigger_gcOverreplicatedLedger_randomly branch from edd51a3 to 22fdca5 Compare April 28, 2024 03:06
@TakaHiR07 TakaHiR07 force-pushed the different_bookie_trigger_gcOverreplicatedLedger_randomly branch from 22fdca5 to 87b438b Compare May 9, 2024 09:23
@TakaHiR07
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants