Skip to content

Commit

Permalink
Disable debug logging
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Oct 27, 2024
1 parent 001bd5b commit fdbe5ac
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 21 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ require (
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect
github.com/DataDog/sketches-go v1.4.6 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.30 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Shopify/toxiproxy/v2 v2.9.0 h1:DIaDZG2/r/kv3Em6UxYBUVnnWl1mHlYTGFv+sTPV7VI=
github.com/Shopify/toxiproxy/v2 v2.9.0/go.mod h1:2uPRyxR46fsx2yUr9i8zcejzdkWfK7p6G23jV/X6YNs=
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down
5 changes: 2 additions & 3 deletions go/mysql/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"vitess.io/vitess/go/mysql/collations"
"vitess.io/vitess/go/mysql/sqlerror"
"vitess.io/vitess/go/sqltypes"
"vitess.io/vitess/go/vt/log"
"vitess.io/vitess/go/vt/proto/vtrpc"
"vitess.io/vitess/go/vt/sqlparser"
"vitess.io/vitess/go/vt/vterrors"
Expand Down Expand Up @@ -424,7 +423,7 @@ func (c *Conn) ExecuteFetchWithWarningCount(query string, maxrows int, wantfield
}

func (c *Conn) ReadQueryResultAsProto(maxrows int, sizehint uint64) (*sqltypes.Result, bool, uint16, error) {
log.Errorf("DEBUG: ReadQueryResultAsProto called with maxrows %v and sizehint %v", maxrows, sizehint)
//log.Errorf("DEBUG: ReadQueryResultAsProto called with maxrows %v and sizehint %v", maxrows, sizehint)
var packetOk PacketOK

// Get the result.
Expand Down Expand Up @@ -511,7 +510,7 @@ func (c *Conn) ReadQueryResultAsProto(maxrows int, sizehint uint64) (*sqltypes.R
builder.Info(packetEof.info)
}

log.Errorf("DEBUG: setting result cached proto to %v", builder.Finish())
//log.Errorf("DEBUG: setting result cached proto to %v", builder.Finish())
result.CachedProto = builder.Finish()
return result, more, warnings, nil

Expand Down
2 changes: 1 addition & 1 deletion go/sqltypes/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ func (result *Result) ToReserveBeginStreamExecuteResponse() *querypb.ReserveBegi

func (result *Result) ToStreamExecuteResponse() *querypb.StreamExecuteResponse {
if result.CachedProto != nil {
log.Errorf("DEBUG: stream execute cached response: %v", result.CachedProto)
//log.Errorf("DEBUG: stream execute cached response: %v", result.CachedProto)
return querypb.CachedStreamExecuteResponse(result.CachedProto)
}
return &querypb.StreamExecuteResponse{Result: ResultToProto3(result)}
Expand Down
7 changes: 3 additions & 4 deletions go/vt/dbconnpool/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"vitess.io/vitess/go/pools/smartconnpool"
"vitess.io/vitess/go/sqltypes"
"vitess.io/vitess/go/vt/dbconfigs"
"vitess.io/vitess/go/vt/log"
)

type PooledDBConnection = smartconnpool.Pooled[*DBConnection]
Expand Down Expand Up @@ -84,9 +83,9 @@ func (dbc *DBConnection) ExecuteFetch(query string, maxrows int, wantfields bool
}

func (dbc *DBConnection) ExecuteFetchOpt(query string, opt mysql.ExecuteOptions) (*sqltypes.Result, error) {
if opt.RawPackets {
log.Errorf("DEBUG: DBConnection ExecuteFetchOpt: options: %v, query: %s", opt, query)
}
//if opt.RawPackets {
//log.Errorf("DEBUG: DBConnection ExecuteFetchOpt: options: %v, query: %s", opt, query)
//}
mqr, err := dbc.Conn.ExecuteFetchOpt(query, opt)
if err != nil {
dbc.handleError(err)
Expand Down
8 changes: 4 additions & 4 deletions go/vt/vttablet/tabletserver/query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (qre *QueryExecutor) Execute() (reply *sqltypes.Result, err error) {
qre.tsv.qe.AddStats(qre.plan, tableName, qre.options.GetWorkloadName(), qre.targetTabletType, 1, duration, mysqlTime, int64(reply.RowsAffected), int64(len(reply.Rows)), 0, errCode)
qre.plan.AddStats(1, duration, mysqlTime, reply.RowsAffected, uint64(len(reply.Rows)), 0)
if reply.CachedProto != nil {
log.Errorf("DEBUG: using cached proto: %v", reply.CachedProto)
//log.Errorf("DEBUG: using cached proto: %v", reply.CachedProto)
qre.plan.PacketSize.Add(uint64(len(reply.CachedProto)))
}
qre.logStats.RowsAffected = int(reply.RowsAffected)
Expand Down Expand Up @@ -1136,9 +1136,9 @@ func (qre *QueryExecutor) execDBConn(conn *connpool.Conn, sql string, wantfields
RawPackets: qre.options.RawMysqlPackets,
SizeHint: sizeHint,
}
if opt.RawPackets {
log.Errorf("DEBUG: execDBConn: opt: %v, sql: %s", opt, sql)
}
//if opt.RawPackets {
//log.Errorf("DEBUG: execDBConn: opt: %v, sql: %s", opt, sql)
//}
return conn.ExecOpt(ctx, sql, opt)
}

Expand Down
12 changes: 6 additions & 6 deletions go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,9 +933,9 @@ func (tsv *TabletServer) execute(ctx context.Context, target *querypb.Target, sq
return nil
},
)
if options.RawMysqlPackets {
log.Errorf("DEBUG: tsv.execute result: %+v, err: %v", result, err)
}
//if options.RawMysqlPackets {
// log.Errorf("DEBUG: tsv.execute result: %+v, err: %v", result, err)
//}
return result, err
}

Expand Down Expand Up @@ -972,9 +972,9 @@ func (tsv *TabletServer) streamExecute(ctx context.Context, target *querypb.Targ
timeout = tsv.config.TxTimeoutForWorkload(querypb.ExecuteOptions_OLAP)
}

if options.RawMysqlPackets {
log.Errorf("DEBUG: tsv.streamExecute with raw packets sql: %s", sql)
}
//if options.RawMysqlPackets {
// log.Errorf("DEBUG: tsv.streamExecute with raw packets sql: %s", sql)
//}

return tsv.execRequest(
ctx, timeout,
Expand Down

0 comments on commit fdbe5ac

Please sign in to comment.