Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

fix: add leader cache #183

Merged
merged 2 commits into from
May 24, 2023
Merged

Conversation

ZuLiangWang
Copy link
Contributor

Which issue does this PR close?

Closes #181

Rationale for this change

As mentioned in the issue, fix the performance problem of routeTable.

What changes are included in this PR?

  • Add leader memory cache in member.
  • Correct the GetLeader method, get the leader endpoint through the cache when forwarding GRPC request.

Are there any user-facing changes?

None.

How does this change test

Pass all unit tests and integration tests.

server/member/member.go Outdated Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ZuLiangWang ZuLiangWang merged commit 4ab299b into apache:main May 24, 2023
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When there are a lot of route table requests, the CPU usage of the node is extremely high
2 participants