Skip to content
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

Fix high CPU usage caused by last committed log index manager. #253

Conversation

JackyWoo
Copy link
Contributor

@JackyWoo JackyWoo commented May 9, 2024

Which issues of this PR fixes:

This PR try to fix #249

Change log:

  • Fix hight CPU usage in LastCommittedIndexManager when there is no log in cluster.
  • Checking gap between log store and snapshot.

befort

ps -Lp 1450787 -o tid,lwp,comm,pcpu | sort -k4 -nr | grep pst_lst_idx
1450821 1450821 pst_lst_idx 76.5

after

1668198 1668198 pst_lst_idx 7.2

@JackyWoo JackyWoo added the bug Something isn't working label May 9, 2024
@JackyWoo JackyWoo added this to the Release v2.0.5 milestone May 9, 2024
@lzydmxy
Copy link
Contributor

lzydmxy commented May 10, 2024

LGTM

@JackyWoo JackyWoo merged commit 33b97b9 into JDRaftKeeper:master May 10, 2024
7 checks passed
@JackyWoo JackyWoo changed the title Fix hight CPU usage in LastCommittedIndexManager Fix high CPU usage caused by last committed log index manager. May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LastCommittedIndexManager costs a lot of CPU.
2 participants