Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjinx committed Oct 31, 2024
1 parent d960401 commit 6dbb66c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go/vt/discovery/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ func (hc *HealthCheckImpl) TabletConnection(alias *topodata.TabletAlias, target
hc.mu.Unlock()
if thc == nil || thc.Conn == nil {
// TODO: test that throws this error
log.Warning("NOT_FOUND: tablet: %v is either down or nonexistent", alias)
log.Warningf("NOT_FOUND: tablet: %v is either down or nonexistent", alias)
return nil, vterrors.Errorf(vtrpc.Code_NOT_FOUND, "tablet: %v is either down or nonexistent", alias)
}
return thc.Connection(hc), nil
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/engine/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ func (svss *SysVarSetAware) Execute(ctx context.Context, vcursor VCursor, env *e
return vterrors.NewErrorf(vtrpcpb.Code_INVALID_ARGUMENT, vterrors.WrongValueForVar, "variable 'session_track_gtids' can't be set to the value of '%s'", str)
}
default:
log.Warning("NOT_FOUOND: unknown system variable '%s'", svss.Name)
log.Warningf("NOT_FOUOND: unknown system variable '%s'", svss.Name)
return vterrors.NewErrorf(vtrpcpb.Code_NOT_FOUND, vterrors.UnknownSystemVariable, "unknown system variable '%s'", svss.Name)
}

Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/plan_execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ func (e *Executor) handleTransactions(
case sqlparser.StmtSRollback:
qr, err := e.handleSavepoint(ctx, safeSession, plan.Original, "Rollback Savepoint", logStats, func(query string) (*sqltypes.Result, error) {
// Error as there is no transaction, so there is no savepoint that exists.
log.Warning("NOT_FOUND: SAVEPOINT does not exist: %s", query)
log.Warningf("NOT_FOUND: SAVEPOINT does not exist: %s", query)
return nil, vterrors.NewErrorf(vtrpcpb.Code_NOT_FOUND, vterrors.SPDoesNotExist, "SAVEPOINT does not exist: %s", query)
}, vcursor.ignoreMaxMemoryRows)
return qr, err
case sqlparser.StmtRelease:
qr, err := e.handleSavepoint(ctx, safeSession, plan.Original, "Release Savepoint", logStats, func(query string) (*sqltypes.Result, error) {
// Error as there is no transaction, so there is no savepoint that exists.
log.Warning("NOT_FOUND: SAVEPOINT does not exist: %s", query)
log.Warningf("NOT_FOUND: SAVEPOINT does not exist: %s", query)
return nil, vterrors.NewErrorf(vtrpcpb.Code_NOT_FOUND, vterrors.SPDoesNotExist, "SAVEPOINT does not exist: %s", query)
}, vcursor.ignoreMaxMemoryRows)
return qr, err
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/scatter_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ func lockInfo(target *querypb.Target, session *SafeSession, lockFuncType sqlpars
info := &shardActionInfo{actionNeeded: nothing}
if session.LockSession != nil {
if !proto.Equal(target, session.LockSession.Target) {
log.Warning("NOT_FOUND: target does match the existing lock session target: (%v, %v)", target, session.LockSession.Target)
log.Warningf("NOT_FOUND: target does match the existing lock session target: (%v, %v)", target, session.LockSession.Target)
return nil, vterrors.Errorf(vtrpcpb.Code_NOT_FOUND, "target does match the existing lock session target: (%v, %v)", target, session.LockSession.Target)
}
info.reservedID = session.LockSession.ReservedId
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/semantics/derived_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (dt *DerivedTable) getExprFor(s string) (sqlparser.Expr, error) {
return dt.cols[i], nil
}
}
log.Warning("NOT_FOUND: Unknown column '%s' in 'field list'", s)
log.Warningf("NOT_FOUND: Unknown column '%s' in 'field list'", s)
return nil, vterrors.NewErrorf(vtrpcpb.Code_NOT_FOUND, vterrors.BadFieldError, "Unknown column '%s' in 'field list'", s)
}

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/tabletgateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func (gw *TabletGateway) updateDefaultConnCollation(tablet *topodatapb.Tablet) {
return
}
if gw.defaultConnCollation.Load() != tablet.DefaultConnCollation {
log.Warning("this Vitess cluster has tablets with different default connection collations: gw: %v, tablet:%v, host:%v",
log.Warningf("this Vitess cluster has tablets with different default connection collations: gw: %v, tablet:%v, host:%v",
gw.defaultConnCollation.Load(), tablet.DefaultConnCollation, tablet.Hostname)
}
}
Expand Down
8 changes: 4 additions & 4 deletions go/vt/vtgate/vindexes/vschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func buildKeyspaceReferences(vschema *VSchema, ksvschema *KeyspaceSchema) error
if vterrors.Code(err) != vtrpcpb.Code_NOT_FOUND || vterrors.ErrState(err) != vterrors.BadDb {
return err
}
log.Warning("NOT_FOUND: source %q references a non-existent keyspace %q",
log.Warningf("NOT_FOUND: source %q references a non-existent keyspace %q",
source,
sourceKsname)
return vterrors.Errorf(
Expand All @@ -505,7 +505,7 @@ func buildKeyspaceReferences(vschema *VSchema, ksvschema *KeyspaceSchema) error
)
}
if sourceT == nil {
log.Warning("NOT_FOUND: source %q references a table %q that is not present in the VSchema of keyspace %q",
log.Warningf("NOT_FOUND: source %q references a table %q that is not present in the VSchema of keyspace %q",
source,
sourceTname,
sourceKsname)
Expand Down Expand Up @@ -614,7 +614,7 @@ func buildTables(ks *vschemapb.Keyspace, vschema *VSchema, ksvschema *KeyspaceSc
}
t.Type = table.Type
default:
log.Warning("NOT_FOUND: unidentified table type %s",
log.Warningf("NOT_FOUND: unidentified table type %s",
table.Type)
return vterrors.Errorf(
vtrpcpb.Code_NOT_FOUND,
Expand Down Expand Up @@ -838,7 +838,7 @@ func resolveAutoIncrement(source *vschemapb.SrvVSchema, vschema *VSchema, parser
// Better to remove the table than to leave it partially initialized.
delete(ksvschema.Tables, tname)
delete(vschema.globalTables, tname)
log.Warning("NOT_FOUND: cannot resolve sequence %s: %s",
log.Warningf("NOT_FOUND: cannot resolve sequence %s: %s",
table.AutoIncrement.Sequence,
err.Error())
ksvschema.Error = vterrors.Errorf(
Expand Down

0 comments on commit 6dbb66c

Please sign in to comment.