Skip to content

Commit

Permalink
Remove some logs that are logging excessively on large clusters (#14825)
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <[email protected]>
  • Loading branch information
rohit-nayak-ps authored Dec 20, 2023
1 parent 6d43493 commit f8968e7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
6 changes: 1 addition & 5 deletions go/vt/vtgate/engine/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ func (svi *SysVarIgnore) VariableName() string {

// Execute implements the SetOp interface method.
func (svi *SysVarIgnore) Execute(context.Context, VCursor, *evalengine.ExpressionEnv) error {
log.Infof("Ignored inapplicable SET %v = %v", svi.Name, svi.Expr)
return nil
}

Expand Down Expand Up @@ -249,17 +248,14 @@ func (svci *SysVarCheckAndIgnore) Execute(ctx context.Context, vcursor VCursor,
return vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "Unexpected error, DestinationKeyspaceID mapping to multiple shards: %v", svci.TargetDestination)
}
checkSysVarQuery := fmt.Sprintf("select 1 from dual where @@%s = %s", svci.Name, svci.Expr)
result, err := execShard(ctx, nil, vcursor, checkSysVarQuery, env.BindVars, rss[0], false /* rollbackOnError */, false /* canAutocommit */)
_, err = execShard(ctx, nil, vcursor, checkSysVarQuery, env.BindVars, rss[0], false /* rollbackOnError */, false /* canAutocommit */)
if err != nil {
// Rather than returning the error, we will just log the error
// as the intention for executing the query it to validate the current setting and eventually ignore it anyways.
// There is no benefit of returning the error back to client.
log.Warningf("unable to validate the current settings for '%s': %s", svci.Name, err.Error())
return nil
}
if len(result.Rows) == 0 {
log.Infof("Ignored inapplicable SET %v = %v", svci.Name, svci.Expr)
}
return nil
}

Expand Down
5 changes: 0 additions & 5 deletions go/vt/vttablet/tabletserver/gc/tablegc.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ func (collector *TableGC) operate(ctx context.Context) {
// find something new to do.
go tableCheckTicker.TickNow()
case <-tableCheckTicker.C:
log.Info("TableGC: tableCheckTicker")
if err := collector.readAndCheckTables(ctx, dropTablesChan, transitionRequestsChan); err != nil {
log.Error(err)
}
Expand Down Expand Up @@ -415,8 +414,6 @@ func (collector *TableGC) readAndCheckTables(

// readTables reads the list of _vt_% tables from the database
func (collector *TableGC) readTables(ctx context.Context) (gcTables []*gcTable, err error) {
log.Infof("TableGC: read tables")

conn, err := collector.pool.Get(ctx, nil)
if err != nil {
return nil, err
Expand All @@ -441,8 +438,6 @@ func (collector *TableGC) readTables(ctx context.Context) (gcTables []*gcTable,
// It lists _vt_% tables, then filters through those which are due-date.
// It then applies the necessary operation per table.
func (collector *TableGC) checkTables(ctx context.Context, gcTables []*gcTable, dropTablesChan chan<- *gcTable, transitionRequestsChan chan<- *transitionRequest) error {
log.Infof("TableGC: check tables")

for i := range gcTables {
table := gcTables[i] // we capture as local variable as we will later use this in a goroutine
shouldTransition, state, uuid, err := collector.shouldTransitionTable(table.tableName)
Expand Down
2 changes: 0 additions & 2 deletions go/vt/vttablet/tabletserver/throttle/throttler.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ func (throttler *Throttler) normalizeThrottlerConfig(throttlerConfig *topodatapb
}

func (throttler *Throttler) WatchSrvKeyspaceCallback(srvks *topodatapb.SrvKeyspace, err error) bool {
log.Infof("Throttler: WatchSrvKeyspaceCallback called with: %+v", srvks)
if err != nil {
log.Errorf("WatchSrvKeyspaceCallback error: %v", err)
return false
Expand All @@ -366,7 +365,6 @@ func (throttler *Throttler) WatchSrvKeyspaceCallback(srvks *topodatapb.SrvKeyspa
// Throttler is enabled and we should apply the config change
// through Operate() or else we get into race conditions.
go func() {
log.Infof("Throttler: submitting a throttler config apply message with: %+v", throttlerConfig)
throttler.throttlerConfigChan <- throttlerConfig
}()
} else {
Expand Down

0 comments on commit f8968e7

Please sign in to comment.