diff --git a/go/pools/smartconnpool/connection.go b/go/pools/smartconnpool/connection.go index cdb5720596e..e130018d7a0 100644 --- a/go/pools/smartconnpool/connection.go +++ b/go/pools/smartconnpool/connection.go @@ -20,6 +20,8 @@ import ( "context" "sync/atomic" "time" + + "vitess.io/vitess/go/vt/log" ) type Connection interface { @@ -45,6 +47,7 @@ func (dbc *Pooled[C]) Close() { } func (dbc *Pooled[C]) Recycle() { + log.Errorf("========================== IM RECYCLING THE CONNECTION\nconn:\n%+v\npool:\n%+v", dbc, dbc.pool) switch { case dbc.pool == nil: dbc.Conn.Close() diff --git a/go/vt/vttablet/tabletserver/query_executor.go b/go/vt/vttablet/tabletserver/query_executor.go index 984c440c650..c045ce76f81 100644 --- a/go/vt/vttablet/tabletserver/query_executor.go +++ b/go/vt/vttablet/tabletserver/query_executor.go @@ -697,12 +697,14 @@ func (qre *QueryExecutor) execSelect() (*sqltypes.Result, error) { } // Check tablet type. if qre.shouldConsolidate() { + log.Error("============================== WE'RE CONSOLIDATING") q, original := qre.tsv.qe.consolidator.Create(sqlWithoutComments) if original { defer q.Broadcast() conn, err := qre.getConn() if err != nil { + log.Errorf("=========================== ERROR WHEN TRYING TO GET CONNECTION WHEN CONSOLIDATING: %s", err) q.SetErr(err) } else { defer conn.Recycle()