Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
shanth96 committed Oct 25, 2024
1 parent 71c07c5 commit 5d38207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions go/vt/topo/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,11 @@ func (ts *Server) ConnForCell(ctx context.Context, cell string) (Conn, error) {
// The cell name can be re-used with a different ServerAddress and/or Root
// in which case we should get a new connection and update the cache
if ci.ServerAddress == cc.cellInfo.ServerAddress && ci.Root == cc.cellInfo.Root {
log.Warningf("ConnForCell. Returning cached connection. Cell:%v, ServerAddress:%v, Root:%v, cellInfoServerAddress:%v, cellInfoRoot:%v", cell, ci.ServerAddress, ci.Root, cc.cellInfo.ServerAddress, cc.cellInfo.Root)
return cc.conn, nil
}
// Close the cached connection, we don't need it anymore
log.Warningf("ConnForCell. Closing cached connection. Cell:%v, ServerAddress:%v, Root:%v, cellInfoServerAddress:%v, cellInfoRoot:%v", cell, ci.ServerAddress, ci.Root, cc.cellInfo.ServerAddress, cc.cellInfo.Root)
if cc.conn != nil {
cc.conn.Close()
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/topo/zk2topo/zk_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (c *ZkConn) getConn(ctx context.Context) (*zk.Conn, error) {
}

func stackTrace() []string {
pc := make([]uintptr, 10)
pc := make([]uintptr, 20)
n := runtime.Callers(0, pc)
if n == 0 {
return []string{}
Expand Down

0 comments on commit 5d38207

Please sign in to comment.