Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous typo fixes to comments #14472

Merged
merged 5 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go/flags/endtoend/vtcombo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Flags:
--stream_buffer_size int the number of bytes sent from vtgate for each stream call. It's recommended to keep this value in sync with vttablet's query-server-config-stream-buffer-size. (default 32768)
--stream_health_buffer_size uint max streaming health entries to buffer per streaming health client (default 20)
--table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class
--table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implcitly always included) (default "hold,purge,evac,drop")
--table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implicitly always included) (default "hold,purge,evac,drop")
--tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid.
--tablet_filters strings Specifies a comma-separated list of 'keyspace|shard_name or keyrange' values to filter the tablets to watch.
--tablet_health_keep_alive duration close streaming tablet health connection if there are no requests for this long (default 5m0s)
Expand All @@ -349,7 +349,7 @@ Flags:
--tablet_refresh_interval duration Tablet refresh interval. (default 1m0s)
--tablet_refresh_known_tablets Whether to reload the tablet's address/port map from topo in case they change. (default true)
--tablet_url_template string Format string describing debug tablet url formatting. See getTabletDebugURL() for how to customize this. (default "http://{{ "{{.GetTabletHostPort}}" }}")
--throttle_tablet_types string Comma separated VTTablet types to be considered by the throttler. default: 'replica'. example: 'replica,rdonly'. 'replica' aways implicitly included (default "replica")
--throttle_tablet_types string Comma separated VTTablet types to be considered by the throttler. default: 'replica'. example: 'replica,rdonly'. 'replica' always implicitly included (default "replica")
--topo_consul_lock_delay duration LockDelay for consul session. (default 15s)
--topo_consul_lock_session_checks string List of checks for consul session. (default "serfHealth")
--topo_consul_lock_session_ttl string TTL for consul session.
Expand Down
4 changes: 2 additions & 2 deletions go/flags/endtoend/vttablet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Flags:
--table-acl-config string path to table access checker config file; send SIGHUP to reload this file
--table-acl-config-reload-interval duration Ticker to reload ACLs. Duration flag, format e.g.: 30s. Default: do not reload
--table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class
--table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implcitly always included) (default "hold,purge,evac,drop")
--table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implicitly always included) (default "hold,purge,evac,drop")
--tablet-path string tablet alias
--tablet_config string YAML file config for tablet
--tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid.
Expand All @@ -355,7 +355,7 @@ Flags:
--tablet_manager_grpc_server_name string the server name to use to validate server certificate
--tablet_manager_protocol string Protocol to use to make tabletmanager RPCs to vttablets. (default "grpc")
--tablet_protocol string Protocol to use to make queryservice RPCs to vttablets. (default "grpc")
--throttle_tablet_types string Comma separated VTTablet types to be considered by the throttler. default: 'replica'. example: 'replica,rdonly'. 'replica' aways implicitly included (default "replica")
--throttle_tablet_types string Comma separated VTTablet types to be considered by the throttler. default: 'replica'. example: 'replica,rdonly'. 'replica' always implicitly included (default "replica")
--topo_consul_lock_delay duration LockDelay for consul session. (default 15s)
--topo_consul_lock_session_checks string List of checks for consul session. (default "serfHealth")
--topo_consul_lock_session_ttl string TTL for consul session.
Expand Down
10 changes: 5 additions & 5 deletions go/vt/schemadiff/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func NewSchemaFromSQL(sql string) (*Schema, error) {
return NewSchemaFromStatements(statements)
}

// getForeignKeyParentTableNames analyzes a CREATE TABLE definition and extracts all referened foreign key tables names.
// getForeignKeyParentTableNames analyzes a CREATE TABLE definition and extracts all referenced foreign key tables names.
// A table name may appear twice in the result output, if it is referenced by more than one foreign key
func getForeignKeyParentTableNames(createTable *sqlparser.CreateTable) (names []string) {
for _, cs := range createTable.TableSpec.Constraints {
Expand Down Expand Up @@ -266,7 +266,7 @@ func (s *Schema) normalize() error {
// It's possible that there's never been any tables in this schema. Which means
// iterationLevel remains zero.
// To deal with views, we must have iterationLevel at least 1. This is because any view reads
// from _something_: at the very least it reads from DUAL (inplicitly or explicitly). Which
// from _something_: at the very least it reads from DUAL (implicitly or explicitly). Which
// puts the view at a higher level.
if iterationLevel < 1 {
iterationLevel = 1
Expand Down Expand Up @@ -451,7 +451,7 @@ func (s *Schema) diff(other *Schema, hints *DiffHints) (diffs []EntityDiff, err
if _, ok := other.named[e.Name()]; !ok {
// other schema does not have the entity
// Entities are sorted in foreign key CREATE TABLE valid order (create parents first, then children).
// When issuing DROPs, we want to reverse that order. We want to first frop children, then parents.
// When issuing DROPs, we want to reverse that order. We want to first do it for children, then parents.
// Instead of analyzing all relationships again, we just reverse the entire order of DROPs, foreign key
// related or not.
dropDiffs = append([]EntityDiff{e.Drop()}, dropDiffs...)
Expand Down Expand Up @@ -766,10 +766,10 @@ func (s *Schema) Apply(diffs []EntityDiff) (*Schema, error) {
return dup, nil
}

// SchemaDiff calulates a rich diff between this schema and the given schema. It builds on top of diff():
// SchemaDiff calculates a rich diff between this schema and the given schema. It builds on top of diff():
// on top of the list of diffs that can take this schema into the given schema, this function also
// evaluates the dependencies between those diffs, if any, and the resulting SchemaDiff object offers OrderedDiffs(),
// the safe ordering of diffs that, when appleid sequentially, does not produce any conflicts and keeps schema valid
// the safe ordering of diffs that, when applied sequentially, does not produce any conflicts and keeps schema valid
// at each step.
func (s *Schema) SchemaDiff(other *Schema, hints *DiffHints) (*SchemaDiff, error) {
diffs, err := s.diff(other, hints)
Expand Down
4 changes: 2 additions & 2 deletions go/vt/schemadiff/schema_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func permutateDiffs(ctx context.Context, diffs []EntityDiff, callback func([]Ent
if len(diffs) == 0 {
return false, nil
}
// Sort by a heristic (DROPs first, ALTERs next, CREATEs last). This ordering is then used first in the permutation
// Sort by a heuristic (DROPs first, ALTERs next, CREATEs last). This ordering is then used first in the permutation
// search and serves as seed for the rest of permutations.

return permDiff(ctx, diffs, callback, 0)
Expand Down Expand Up @@ -296,7 +296,7 @@ func (d *SchemaDiff) OrderedDiffs(ctx context.Context) ([]EntityDiff, error) {
for i, diff := range d.UnorderedDiffs() {
unorderedDiffsMap[diff.CanonicalStatementString()] = i
}
// The order of classes in the quivalence relation is, generally speaking, loyal to the order of original diffs.
// The order of classes in the equivalence relation is, generally speaking, loyal to the order of original diffs.
for _, class := range d.r.OrderedClasses() {
classDiffs := []EntityDiff{}
// Which diffs are in this equivalence class?
Expand Down
2 changes: 1 addition & 1 deletion go/vt/schemadiff/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ func TestViewReferences(t *testing.T) {
}

// TestMassiveSchema loads thousands of tables into one schema, and thousands of tables, some of which are different, into another schema.
// It compares the two shemas.
// It compares the two schemas.
// The objective of this test is to verify that execution time is _reasonable_. Since this will run in GitHub CI, which is very slow, we allow
// for 1 minute total for all operations.
func TestMassiveSchema(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/schemadiff/semantics.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var semanticKS = &vindexes.Keyspace{

var _ semantics.SchemaInformation = (*declarativeSchemaInformation)(nil)

// declarativeSchemaInformation is a utility wrapper arounf FakeSI, and adds a few utility functions
// declarativeSchemaInformation is a utility wrapper around FakeSI, and adds a few utility functions
// to make it more simple and accessible to schemadiff's logic.
type declarativeSchemaInformation struct {
Tables map[string]*vindexes.Table
Expand Down
12 changes: 6 additions & 6 deletions go/vt/schemadiff/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ func (c *CreateTableEntity) diffOptions(alterTable *sqlparser.AlterTable,

// rangePartitionsAddedRemoved returns true when:
// - both table partitions are RANGE type
// - there is exactly one consequitive non-empty shared sequence of partitions (same names, same range values, in same order)
// - there is exactly one consecutive non-empty shared sequence of partitions (same names, same range values, in same order)
// - table1 may have non-empty list of partitions _preceding_ this sequence, and table2 may not
// - table2 may have non-empty list of partitions _following_ this sequence, and table1 may not
func (c *CreateTableEntity) isRangePartitionsRotation(
Expand Down Expand Up @@ -1189,7 +1189,7 @@ func (c *CreateTableEntity) isRangePartitionsRotation(
definitions1 = definitions1[1:]
}
if len(definitions1) == 0 {
// We've exhaused definition1 trying to find a shared partition with definitions2. Nothing found.
// We've exhausted definition1 trying to find a shared partition with definitions2. Nothing found.
// so there is no shared sequence between the two tables.
return false, nil, nil
}
Expand Down Expand Up @@ -1251,9 +1251,9 @@ func (c *CreateTableEntity) diffPartitions(alterTable *sqlparser.AlterTable,
return nil, nil
default:
// partitioning was changed
// For most cases, we produce a complete re-partitioing schema: we don't try and figure out the minimal
// For most cases, we produce a complete re-partitioning schema: we don't try and figure out the minimal
// needed change. For example, maybe the minimal change is to REORGANIZE a specific partition and split
// into two, thus unaffecting the rest of the partitions. But we don't evaluate that, we just set a
// into two, thus not affecting the rest of the partitions. But we don't evaluate that, we just set a
// complete new ALTER TABLE ... PARTITION BY statement.
// The idea is that it doesn't matter: we're not looking to do optimal in-place ALTERs, we run
// Online DDL alters, where we create a new table anyway. Thus, the optimization is meaningless.
Expand Down Expand Up @@ -1602,7 +1602,7 @@ func (c *CreateTableEntity) diffColumns(alterTable *sqlparser.AlterTable,
modifyColumnDiff := t1ColEntity.ColumnDiff(t2ColEntity, hints)
if modifyColumnDiff == nil {
// even if there's no apparent change, there can still be implicit changes
// it is possible that the table charset is changed. the column may be some col1 TEXT NOT NULL, possibly in both varsions 1 and 2,
// it is possible that the table charset is changed. the column may be some col1 TEXT NOT NULL, possibly in both versions 1 and 2,
// but implicitly the column has changed its characters set. So we need to explicitly ass a MODIFY COLUMN statement, so that
// MySQL rebuilds it.
if tableCharsetChanged && t2ColEntity.IsTextual() && t2Col.Type.Charset.Name == "" {
Expand Down Expand Up @@ -1684,7 +1684,7 @@ func heuristicallyDetectColumnRenames(
// - the DROP and ADD column definitions are identical other than the column name, and
// - the DROPped and ADDded column are both FIRST, or they come AFTER the same column, and
// - the DROPped and ADDded column are both last, or they come before the same column
// This v1 chcek therefore cannot handle a case where two successive columns are renamed.
// This v1 check therefore cannot handle a case where two successive columns are renamed.
// the problem is complex, and with successive renamed, or drops and adds, it can be
// impossible to tell apart different scenarios.
// At any case, once we heuristically decide that we found a RENAME, we cancel the DROP,
Expand Down
2 changes: 1 addition & 1 deletion go/vt/sidecardb/sidecardb.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func (si *schemaInit) getCurrentSchema(tableName string) (string, error) {
}

// findTableSchemaDiff gets the diff which needs to be applied
// to the current table schema in order toreach the desired one.
// to the current table schema in order to reach the desired one.
// The result will be an empty string if they match.
// This will be a CREATE statement if the table does not exist
// or an ALTER if the table exists but has a different schema.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/grpcvtctldserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3986,7 +3986,7 @@ func TestDeleteTablets(t *testing.T) {
// value anymore
defer unlock(&lerr)

// we do, however, care that the lock context gets propogated
// we do, however, care that the lock context gets propagated
// both to additional calls to lock, and to the actual RPC call.
ctx = lctx
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (a handlesByName) Less(i, j int) bool { return a[i].Name() < a[j].Name() }
// *backupstorage.BackupStorageImplementation to this value before use.
const BackupStorageImplementation = "grpcvtctldserver.testutil"

// BackupStorage is the singleton test backupstorage.BackupStorage intastnce. It
// BackupStorage is the singleton test backupstorage.BackupStorage instance. It
// is public and singleton to allow tests to both mutate and assert against its
// state.
var BackupStorage = &backupStorage{
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ func (fake *TabletManagerClient) UndoDemotePrimary(ctx context.Context, tablet *
return assert.AnError
}

// VReplicationExec is part of the tmclient.TabletManagerCLient interface.
// VReplicationExec is part of the tmclient.TabletManagerClient interface.
func (fake *TabletManagerClient) VReplicationExec(ctx context.Context, tablet *topodatapb.Tablet, query string) (*querypb.QueryResult, error) {
if fake.VReplicationExecResults == nil {
return nil, assert.AnError
Expand Down Expand Up @@ -1393,7 +1393,7 @@ func (fake *TabletManagerClient) VReplicationExec(ctx context.Context, tablet *t
return nil, assert.AnError
}

// CheckThrottler is part of the tmclient.TabletManagerCLient interface.
// CheckThrottler is part of the tmclient.TabletManagerClient interface.
func (fake *TabletManagerClient) CheckThrottler(ctx context.Context, tablet *topodatapb.Tablet, req *tabletmanagerdatapb.CheckThrottlerRequest) (*tabletmanagerdatapb.CheckThrottlerResponse, error) {
if fake.CheckThrottlerResults == nil {
return nil, assert.AnError
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtctl/internal/grpcshim/bidi_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type BidiStream struct {

// NewBidiStream returns a BidiStream ready for embedded use. The provided ctx
// will be used for the stream context, and types embedding BidiStream should
// check context cancellation/expiriation in their respective Recv and Send
// check context cancellation/expiration in their respective Recv and Send
// methods.
//
// See the documentation on BidiStream for example usage.
Expand All @@ -123,7 +123,7 @@ func (bs *BidiStream) Closed() <-chan struct{} {

// IsClosed returns true if the stream has been closed for sending.
//
// It is a conveince function for attempting to select on the channel returned
// It is a convenience function for attempting to select on the channel returned
// by bs.Closed().
func (bs *BidiStream) IsClosed() bool {
select {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/reparentutil/emergency_reparenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ func (erp *EmergencyReparenter) identifyPrimaryCandidate(
}
}
// Unreachable code.
// We should have found atleast 1 tablet in the valid list.
// We should have found at least 1 tablet in the valid list.
// If the list is empty, then we should have errored out much sooner.
return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "unreachable - did not find a valid primary candidate even though the valid candidate list was non-empty")
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/reparentutil/replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestFindValidEmergencyReparentCandidates(t *testing.T) {
statusMap map[string]*replicationdatapb.StopReplicationStatus
primaryStatusMap map[string]*replicationdatapb.PrimaryStatus
// Note: for these tests, it's simpler to compare keys than actual
// mysql.Postion structs, which are just thin wrappers around the
// mysql.Position structs, which are just thin wrappers around the
// mysql.GTIDSet interface. If a tablet alias makes it into the map, we
// know it was chosen by the method, and that either
// mysql.DecodePosition was successful (in the primary case) or
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/vdiff_env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (

const (
// vdiffStopPosition is the default stop position for the target vreplication.
// It can be overridden with the positons argument to newTestVDiffEnv.
// It can be overridden with the positions argument to newTestVDiffEnv.
vdiffStopPosition = "MySQL56/d834e6b8-7cbf-11ed-a1eb-0242ac120002:1-892"
// vdiffSourceGtid should be the position reported by the source side VStreamResults.
// It's expected to be higher the vdiffStopPosition.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/vtctldclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Factory func(addr string) (VtctldClient, error)
var registry = map[string]Factory{}

// Register adds a VtctldClient factory for the given name (protocol).
// Attempting to register mulitple factories for the same protocol is a fatal
// Attempting to register multiple factories for the same protocol is a fatal
// error.
func Register(name string, factory Factory) {
if _, ok := registry[name]; ok {
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ var (
type Server struct {
ts *topo.Server
tmc tmclient.TabletManagerClient
// Limt the number of concurrent background goroutines if needed.
// Limit the number of concurrent background goroutines if needed.
sem *semaphore.Weighted
}

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/workflow/vexec/query_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
querypb "vitess.io/vitess/go/vt/proto/query"
)

// QueryPlan defines the interface to executing a preprared vexec query on one
// QueryPlan defines the interface to executing a prepared vexec query on one
// or more tablets. Implementations should ensure that it is safe to call the
// various Execute* methods repeatedly and in multiple goroutines.
type QueryPlan interface {
Expand Down
Loading
Loading