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

Random connect PD instance for the MemberList grpc call #9110

Open
wxiaomou opened this issue Feb 28, 2025 · 0 comments
Open

Random connect PD instance for the MemberList grpc call #9110

wxiaomou opened this issue Feb 28, 2025 · 0 comments
Labels
type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@wxiaomou
Copy link

Feature Request

Random connect PD instance for the MemberList call

Describe your feature request related problem

When PD looses leadership, all TiKV/TiDB pods start to call MemberList on PD/ETCD to find the leader. During incident we found that all these calls always go to a particular PD instance.
It seems we always sort the PD members, thus when TiKV/TiDB trying to get the PD leaders they always reach to a specific PD pod which caused disproportional GRPC calls increase on the PD instance.

func (c *RaftCluster) Members() []*Member {
	c.Lock()
	defer c.Unlock()
	var ms MembersByID
	for _, m := range c.members {
		ms = append(ms, m.Clone())
	}
	sort.Sort(ms)
	return []*Member(ms)
}

Describe the feature you'd like

Describe alternatives you've considered

Teachability, Documentation, Adoption, Migration Strategy

@wxiaomou wxiaomou added the type/feature-request Categorizes issue or PR as related to a new feature. label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant