From 5d382073f912c012addc5cba94633b891c3e5a2a Mon Sep 17 00:00:00 2001 From: shanth96 Date: Fri, 25 Oct 2024 00:16:48 -0400 Subject: [PATCH] more --- go/vt/topo/server.go | 2 ++ go/vt/topo/zk2topo/zk_conn.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/vt/topo/server.go b/go/vt/topo/server.go index 1995e8b6ec4..5f04b2e8c2f 100644 --- a/go/vt/topo/server.go +++ b/go/vt/topo/server.go @@ -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() } diff --git a/go/vt/topo/zk2topo/zk_conn.go b/go/vt/topo/zk2topo/zk_conn.go index 9833a70cf25..f4472f5c35f 100644 --- a/go/vt/topo/zk2topo/zk_conn.go +++ b/go/vt/topo/zk2topo/zk_conn.go @@ -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{}