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 meta data related operation hang when zk down #7228

Merged
merged 1 commit into from
Dec 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go/vt/topo/zk2topo/zk_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ func (c *ZkConn) handleSessionEvents(conn *zk.Conn, session <-chan zk.Event) {
func dialZk(ctx context.Context, addr string) (*zk.Conn, <-chan zk.Event, error) {
servers := strings.Split(addr, ",")
dialer := zk.WithDialer(net.DialTimeout)
ctx, cancel := context.WithTimeout(ctx, *baseTimeout)
defer cancel()
// If TLS is enabled use a TLS enabled dialer option
if *certPath != "" && *keyPath != "" {
if strings.Contains(addr, ",") {
Expand Down