diff --git a/go/cmd/vtbackup/vtbackup.go b/go/cmd/vtbackup/vtbackup.go index 84919772e3d..690271a0e63 100644 --- a/go/cmd/vtbackup/vtbackup.go +++ b/go/cmd/vtbackup/vtbackup.go @@ -345,7 +345,7 @@ func resetReplication(ctx context.Context, pos mysql.Position, mysqld mysqlctl.M return vterrors.Wrap(err, "failed to reset slave") } - // Check if we have a postion to resume from, if not reset to the beginning of time + // Check if we have a position to resume from, if not reset to the beginning of time if !pos.IsZero() { // Set the position at which to resume from the master. if err := mysqld.SetSlavePosition(ctx, pos); err != nil { diff --git a/go/mysql/auth_server_static_test.go b/go/mysql/auth_server_static_test.go index b29d195d845..327e37bd2f6 100644 --- a/go/mysql/auth_server_static_test.go +++ b/go/mysql/auth_server_static_test.go @@ -105,7 +105,7 @@ func TestHostMatcher(t *testing.T) { addr := &net.TCPAddr{IP: ip, Port: 9999} match := matchSourceHost(net.Addr(addr), "") if !match { - t.Fatalf("Should match any addres when target is empty") + t.Fatalf("Should match any address when target is empty") } match = matchSourceHost(net.Addr(addr), "localhost") diff --git a/go/mysql/binlog_event_common.go b/go/mysql/binlog_event_common.go index 5765fbb0342..7ee90036d7c 100644 --- a/go/mysql/binlog_event_common.go +++ b/go/mysql/binlog_event_common.go @@ -176,7 +176,7 @@ func (ev binlogEvent) IsPseudo() bool { // 4 timestamp (same as timestamp header field) // 1 header length // p (one byte per packet type) event type header lengths -// Rest was infered from reading source code: +// Rest was inferred from reading source code: // 1 checksum algorithm // 4 checksum func (ev binlogEvent) Format() (f BinlogFormat, err error) { diff --git a/go/mysql/binlog_event_make.go b/go/mysql/binlog_event_make.go index 343d97da1fd..07149079a43 100644 --- a/go/mysql/binlog_event_make.go +++ b/go/mysql/binlog_event_make.go @@ -151,7 +151,7 @@ func NewInvalidFormatDescriptionEvent(f BinlogFormat, s *FakeBinlogStream) Binlo } // NewRotateEvent returns a RotateEvent. -// The timestmap of such an event should be zero, so we patch it in. +// The timestamp of such an event should be zero, so we patch it in. func NewRotateEvent(f BinlogFormat, s *FakeBinlogStream, position uint64, filename string) BinlogEvent { length := 8 + // position len(filename) diff --git a/go/mysql/binlog_event_make_test.go b/go/mysql/binlog_event_make_test.go index c6c00cc27cf..e2b1ebe56d5 100644 --- a/go/mysql/binlog_event_make_test.go +++ b/go/mysql/binlog_event_make_test.go @@ -358,7 +358,7 @@ func TestRowsEvent(t *testing.T) { // 1076895760 is 0x40302010. identifies, _ := rows.StringIdentifiesForTests(tm, 0) if expected := []string{"1076895760", "abc"}; !reflect.DeepEqual(identifies, expected) { - t.Fatalf("bad Rows idenfity, got %v expected %v", identifies, expected) + t.Fatalf("bad Rows identify, got %v expected %v", identifies, expected) } values, _ := rows.StringValuesForTests(tm, 0) if expected := []string{"1076895760", "abcd"}; !reflect.DeepEqual(values, expected) { diff --git a/go/mysql/encoding_test.go b/go/mysql/encoding_test.go index 75637146f91..7f56f583c86 100644 --- a/go/mysql/encoding_test.go +++ b/go/mysql/encoding_test.go @@ -69,7 +69,7 @@ func TestEncLenInt(t *testing.T) { t.Errorf("unexpected encoded value for %x, got %v expected %v", test.value, data, test.encoded) } - // Check succesful decoding. + // Check successful decoding. got, pos, ok := readLenEncInt(test.encoded, 0) if !ok || got != test.value || pos != len(test.encoded) { t.Errorf("readLenEncInt returned %x/%v/%v but expected %x/%v/%v", got, pos, ok, test.value, len(test.encoded), true) @@ -240,7 +240,7 @@ func TestEncString(t *testing.T) { t.Errorf("unexpected lenEncoded value for %v, got %v expected %v", test.value, data[1:], test.lenEncoded) } - // Check succesful decoding as string. + // Check successful decoding as string. got, pos, ok := readLenEncString(test.lenEncoded, 0) if !ok || got != test.value || pos != len(test.lenEncoded) { t.Errorf("readLenEncString returned %v/%v/%v but expected %v/%v/%v", got, pos, ok, test.value, len(test.lenEncoded), true) @@ -258,7 +258,7 @@ func TestEncString(t *testing.T) { t.Errorf("readLenEncString returned ok=true for empty value %v", test.value) } - // Check succesful skipping as string. + // Check successful skipping as string. pos, ok = skipLenEncString(test.lenEncoded, 0) if !ok || pos != len(test.lenEncoded) { t.Errorf("skipLenEncString returned %v/%v but expected %v/%v", pos, ok, len(test.lenEncoded), true) @@ -276,7 +276,7 @@ func TestEncString(t *testing.T) { t.Errorf("skipLenEncString returned ok=true for empty value %v", test.value) } - // Check succesful decoding as bytes. + // Check successful decoding as bytes. gotb, pos, ok := readLenEncStringAsBytes(test.lenEncoded, 0) if !ok || string(gotb) != test.value || pos != len(test.lenEncoded) { t.Errorf("readLenEncString returned %v/%v/%v but expected %v/%v/%v", gotb, pos, ok, test.value, len(test.lenEncoded), true) @@ -306,7 +306,7 @@ func TestEncString(t *testing.T) { t.Errorf("unexpected nullEncoded value for %v, got %v expected %v", test.value, data, test.nullEncoded) } - // Check succesful decoding. + // Check successful decoding. got, pos, ok = readNullString(test.nullEncoded, 0) if !ok || got != test.value || pos != len(test.nullEncoded) { t.Errorf("readNullString returned %v/%v/%v but expected %v/%v/%v", got, pos, ok, test.value, len(test.nullEncoded), true) diff --git a/go/mysql/endtoend/replication_test.go b/go/mysql/endtoend/replication_test.go index 8ddfc0b3998..46b5d3a53f9 100644 --- a/go/mysql/endtoend/replication_test.go +++ b/go/mysql/endtoend/replication_test.go @@ -458,7 +458,7 @@ func TestRowReplicationWithRealDatabase(t *testing.T) { } -// TestRowReplicationTypes creates a table wih all +// TestRowReplicationTypes creates a table with all // supported data types. Then we insert a row in it. then we re-build // the SQL for the values, re-insert these. Then we select from the // database and make sure both rows are identical. diff --git a/go/mysql/query_test.go b/go/mysql/query_test.go index b41524fc237..2d4bf7a13e0 100644 --- a/go/mysql/query_test.go +++ b/go/mysql/query_test.go @@ -186,7 +186,7 @@ func TestComStmtSendLongData(t *testing.T) { t.Fatalf("parseComStmtSendLongData failed") } if paramID != 1 { - t.Fatalf("Recieved incorrect ParamID, want %v, got %v:", paramID, 1) + t.Fatalf("Received incorrect ParamID, want %v, got %v:", paramID, 1) } if stmtID != prepare.StatementID { t.Fatalf("Received incorrect value, want: %v, got: %v", uint32(data[1]), prepare.StatementID) @@ -194,7 +194,7 @@ func TestComStmtSendLongData(t *testing.T) { // Check length of chunkData, Since its a subset of `data` and compare with it after we subtract the number of bytes that was read from it. // sizeof(uint32) + sizeof(uint16) + 1 = 7 if len(chunkData) != len(data)-7 { - t.Fatalf("Recieved bad chunkData") + t.Fatalf("Received bad chunkData") } } diff --git a/go/netutil/conn.go b/go/netutil/conn.go index 40e59afcbca..90d7a5139f2 100644 --- a/go/netutil/conn.go +++ b/go/netutil/conn.go @@ -45,7 +45,7 @@ func (c ConnWithTimeouts) Read(b []byte) (int, error) { return c.Conn.Read(b) } -// Write sets a write deadline and delagates to conn.Write +// Write sets a write deadline and delegates to conn.Write func (c ConnWithTimeouts) Write(b []byte) (int, error) { if c.writeTimeout == 0 { return c.Conn.Write(b) diff --git a/go/vt/automation/scheduler.go b/go/vt/automation/scheduler.go index cfbb5fc0520..ddaa1fc4c69 100644 --- a/go/vt/automation/scheduler.go +++ b/go/vt/automation/scheduler.go @@ -55,7 +55,7 @@ type Scheduler struct { // Guarded by "mu". state schedulerState - // Guarded by "taskCreatorMu". May be overriden by testing code. + // Guarded by "taskCreatorMu". May be overridden by testing code. taskCreator taskCreator taskCreatorMu sync.Mutex diff --git a/go/vt/binlog/binlogplayer/binlog_player.go b/go/vt/binlog/binlogplayer/binlog_player.go index b628486fb93..b62522a1ce9 100644 --- a/go/vt/binlog/binlogplayer/binlog_player.go +++ b/go/vt/binlog/binlogplayer/binlog_player.go @@ -174,7 +174,7 @@ func NewBinlogPlayerTables(dbClient DBClient, tablet *topodatapb.Tablet, tables // and processes the events. It returns nil if the provided context // was canceled, or if we reached the stopping point. // If an error is encountered, it updates the vreplication state to "Error". -// If a stop position was specifed, and reached, the state is updated to "Stopped". +// If a stop position was specified, and reached, the state is updated to "Stopped". func (blp *BinlogPlayer) ApplyBinlogEvents(ctx context.Context) error { if err := SetVReplicationState(blp.dbClient, blp.uid, BlpRunning, ""); err != nil { log.Errorf("Error writing Running state: %v", err) diff --git a/go/vt/binlog/keyrange_filter.go b/go/vt/binlog/keyrange_filter.go index 1a0debed59e..6d4ae50ff14 100644 --- a/go/vt/binlog/keyrange_filter.go +++ b/go/vt/binlog/keyrange_filter.go @@ -177,7 +177,7 @@ func logExtractKeySpaceIDError(err error) { case sqlannotation.ExtractKeySpaceIDReplicationUnfriendlyError: log.Errorf( "Found replication unfriendly statement. (%s). "+ - "Filtered replication should abort, but we're currenty just skipping the statement.", + "Filtered replication should abort, but we're currently just skipping the statement.", extractErr.Message) updateStreamErrors.Add("ExtractKeySpaceIDReplicationUnfriendlyError", 1) default: diff --git a/go/vt/dbconfigs/dbconfigs.go b/go/vt/dbconfigs/dbconfigs.go index f180f9dc88a..c15ad1e6415 100644 --- a/go/vt/dbconfigs/dbconfigs.go +++ b/go/vt/dbconfigs/dbconfigs.go @@ -91,7 +91,7 @@ func RegisterFlags(userKeys ...string) { } func registerBaseFlags() { - flag.StringVar(&baseConfig.UnixSocket, "db_socket", "", "The unix socket to connect on. If this is specifed, host and port will not be used.") + flag.StringVar(&baseConfig.UnixSocket, "db_socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.") flag.StringVar(&baseConfig.Host, "db_host", "", "The host name for the tcp connection.") flag.IntVar(&baseConfig.Port, "db_port", 0, "tcp port") flag.StringVar(&baseConfig.Charset, "db_charset", "", "Character set. Only utf8 or latin1 based character sets are supported.") diff --git a/go/vt/discovery/replicationlag.go b/go/vt/discovery/replicationlag.go index cebc27851a2..1e8237c8dca 100644 --- a/go/vt/discovery/replicationlag.go +++ b/go/vt/discovery/replicationlag.go @@ -53,7 +53,7 @@ func IsReplicationLagVeryHigh(tabletStats *TabletStats) bool { // lags of (30m, 35m, 40m, 45m) return all. // // One thing to know about this code: vttablet also has a couple flags that impact the logic here: -// * unhealthy_threshold: if replication lag is higher than this, a tablet will be reported as unhealhty. +// * unhealthy_threshold: if replication lag is higher than this, a tablet will be reported as unhealthy. // The default for this is 2h, same as the discovery_high_replication_lag_minimum_serving here. // * degraded_threshold: this is only used by vttablet for display. It should match // discovery_low_replication_lag here, so the vttablet status display matches what vtgate will do of it. diff --git a/go/vt/mysqlctl/fakemysqldaemon/fakemysqldaemon.go b/go/vt/mysqlctl/fakemysqldaemon/fakemysqldaemon.go index 166ed5a01c0..dcc76a6d945 100644 --- a/go/vt/mysqlctl/fakemysqldaemon/fakemysqldaemon.go +++ b/go/vt/mysqlctl/fakemysqldaemon/fakemysqldaemon.go @@ -54,7 +54,7 @@ type FakeMysqlDaemon struct { // Replicating is updated when calling StartSlave / StopSlave // (it is not used at all when calling SlaveStatus, it is the - // test owner responsability to have these two match) + // test owner responsibility to have these two match) Replicating bool // CurrentMasterPosition is returned by MasterPosition @@ -117,7 +117,7 @@ type FakeMysqlDaemon struct { // ExecuteSuperQueryList to be called with. If it doesn't // match, ExecuteSuperQueryList will return an error. // Note each string is just a substring if it begins with SUB, - // so we support partial queries (usefull when queries contain + // so we support partial queries (useful when queries contain // data fields like timestamps) ExpectedExecuteSuperQueryList []string diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 88ddfd485ca..ec8b4f71ab7 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -964,7 +964,7 @@ type Field struct { ColumnLength uint32 `protobuf:"varint,7,opt,name=column_length,json=columnLength,proto3" json:"column_length,omitempty"` // charset is actually a uint16. Only the lower 16 bits are used. Charset uint32 `protobuf:"varint,8,opt,name=charset,proto3" json:"charset,omitempty"` - // decimals is actualy a uint8. Only the lower 8 bits are used. + // decimals is actually a uint8. Only the lower 8 bits are used. Decimals uint32 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` // flags is actually a uint16. Only the lower 16 bits are used. Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` diff --git a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go index acb13b630d7..686c293a382 100644 --- a/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go +++ b/go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go @@ -113,7 +113,7 @@ type TabletManagerClient interface { // PopulateReparentJournal tells the tablet to add an entry to its // reparent journal PopulateReparentJournal(ctx context.Context, in *tabletmanagerdata.PopulateReparentJournalRequest, opts ...grpc.CallOption) (*tabletmanagerdata.PopulateReparentJournalResponse, error) - // InitSlave tells the tablet to reparent to the master unconditionnally + // InitSlave tells the tablet to reparent to the master unconditionally InitSlave(ctx context.Context, in *tabletmanagerdata.InitSlaveRequest, opts ...grpc.CallOption) (*tabletmanagerdata.InitSlaveResponse, error) // DemoteMaster tells the soon-to-be-former master it's gonna change DemoteMaster(ctx context.Context, in *tabletmanagerdata.DemoteMasterRequest, opts ...grpc.CallOption) (*tabletmanagerdata.DemoteMasterResponse, error) @@ -667,7 +667,7 @@ type TabletManagerServer interface { // PopulateReparentJournal tells the tablet to add an entry to its // reparent journal PopulateReparentJournal(context.Context, *tabletmanagerdata.PopulateReparentJournalRequest) (*tabletmanagerdata.PopulateReparentJournalResponse, error) - // InitSlave tells the tablet to reparent to the master unconditionnally + // InitSlave tells the tablet to reparent to the master unconditionally InitSlave(context.Context, *tabletmanagerdata.InitSlaveRequest) (*tabletmanagerdata.InitSlaveResponse, error) // DemoteMaster tells the soon-to-be-former master it's gonna change DemoteMaster(context.Context, *tabletmanagerdata.DemoteMasterRequest) (*tabletmanagerdata.DemoteMasterResponse, error) diff --git a/go/vt/proto/topodata/topodata.pb.go b/go/vt/proto/topodata/topodata.pb.go index 9e22bf51309..9d59160d863 100644 --- a/go/vt/proto/topodata/topodata.pb.go +++ b/go/vt/proto/topodata/topodata.pb.go @@ -505,7 +505,7 @@ func (m *Shard_ServedType) GetCells() []string { } // SourceShard represents a data source for filtered replication -// accross shards. When this is used in a destination shard, the master +// across shards. When this is used in a destination shard, the master // of that shard will run filtered replication. type Shard_SourceShard struct { // Uid is the unique ID for this SourceShard object. diff --git a/go/vt/proto/vtrpc/vtrpc.pb.go b/go/vt/proto/vtrpc/vtrpc.pb.go index a9b53a78efa..6881f6ed3ae 100644 --- a/go/vt/proto/vtrpc/vtrpc.pb.go +++ b/go/vt/proto/vtrpc/vtrpc.pb.go @@ -174,7 +174,7 @@ func (Code) EnumDescriptor() ([]byte, []int) { // LegacyErrorCode is the enum values for Errors. This type is deprecated. // Use Code instead. Background: In the initial design, we thought // that we may end up with a different list of canonical error codes -// than the ones defined by grpc. In hindisght, we realize that +// than the ones defined by grpc. In hindsight, we realize that // the grpc error codes are fairly generic and mostly sufficient. // In order to avoid confusion, this type will be deprecated in // favor of the new Code that matches exactly what grpc defines. diff --git a/go/vt/sqlannotation/sqlannotation.go b/go/vt/sqlannotation/sqlannotation.go index c8e20328720..5cebc2dd728 100644 --- a/go/vt/sqlannotation/sqlannotation.go +++ b/go/vt/sqlannotation/sqlannotation.go @@ -19,7 +19,7 @@ limitations under the License. // comments and parsing them. These annotations // are used during filtered-replication to route // the DML statement to the correct shard. -// TOOD(erez): Move the code for the "_stream" annotations +// TODO(erez): Move the code for the "_stream" annotations // from vttablet to here. package sqlannotation @@ -77,7 +77,7 @@ func AddKeyspaceIDs(sql string, keyspaceIDs [][]byte, marginComments string) str // to extract the keyspace id. // If a keyspace-id comment exists 'keyspaceID' is set to the parsed keyspace id // and err is set to nil; otherwise, if a filtered-replication-unfriendly comment exists -// or some other parsing error occured, keyspaceID is set to nil and err is set to a non-nil +// or some other parsing error occurred, keyspaceID is set to nil and err is set to a non-nil // error value. func ExtractKeyspaceIDS(sql string) (keyspaceIDs [][]byte, err error) { _, comments := sqlparser.SplitMarginComments(sql) diff --git a/go/vt/throttler/max_replication_lag_module.go b/go/vt/throttler/max_replication_lag_module.go index 7cab0bf5681..8881f59d302 100644 --- a/go/vt/throttler/max_replication_lag_module.go +++ b/go/vt/throttler/max_replication_lag_module.go @@ -485,7 +485,7 @@ func (m *MaxReplicationLagModule) increaseRate(r *result, now time.Time, lagReco return } - // Calculate new rate based on the previous (preferrably highest good) rate. + // Calculate new rate based on the previous (preferably highest good) rate. highestGood := m.memory.highestGood() previousRateSource := "highest known good rate" previousRate := float64(highestGood) diff --git a/go/vt/throttler/max_replication_lag_module_test.go b/go/vt/throttler/max_replication_lag_module_test.go index e5537e64f24..4d2eef4263c 100644 --- a/go/vt/throttler/max_replication_lag_module_test.go +++ b/go/vt/throttler/max_replication_lag_module_test.go @@ -127,7 +127,7 @@ func TestMaxReplicationLagModule_InitialStateAndWait(t *testing.T) { } } -// TestMaxReplicationLagModule_Increase tests only the continous increase of the +// TestMaxReplicationLagModule_Increase tests only the continuous increase of the // rate and assumes that we are well below the replica capacity. func TestMaxReplicationLagModule_Increase(t *testing.T) { tf, err := newTestFixtureWithMaxReplicationLag(5) diff --git a/go/vt/throttler/replication_lag_cache_test.go b/go/vt/throttler/replication_lag_cache_test.go index 7e00366674d..e3e06896aa7 100644 --- a/go/vt/throttler/replication_lag_cache_test.go +++ b/go/vt/throttler/replication_lag_cache_test.go @@ -32,7 +32,7 @@ func TestReplicationLagCache(t *testing.T) { // If there is no entry yet, a zero struct is returned. zeroEntry := c.atOrAfter(r1Key, sinceZero(0*time.Second)) if !zeroEntry.isZero() { - t.Fatalf("atOrAfter() should have returned a zero entry but did not: %v", zeroEntry) + t.Fatalf("atOrAfter() should have returned a zero entry but did not: %v", zeroEntry) } // First entry at 1s. diff --git a/go/vt/throttler/throttlerclient/throttlerclient.go b/go/vt/throttler/throttlerclient/throttlerclient.go index 4abe73b5538..cfcbd05ef8e 100644 --- a/go/vt/throttler/throttlerclient/throttlerclient.go +++ b/go/vt/throttler/throttlerclient/throttlerclient.go @@ -29,7 +29,7 @@ import ( throttlerdatapb "vitess.io/vitess/go/vt/proto/throttlerdata" ) -// protocol specifices which RPC client implementation should be used. +// protocol specifics which RPC client implementation should be used. var protocol = flag.String("throttler_client_protocol", "grpc", "the protocol to use to talk to the integrated throttler service") // Client defines the generic RPC interface for the throttler service. diff --git a/go/vt/throttler/throttlerlogz_test.go b/go/vt/throttler/throttlerlogz_test.go index d94fa86321c..a7651f883fd 100644 --- a/go/vt/throttler/throttlerlogz_test.go +++ b/go/vt/throttler/throttlerlogz_test.go @@ -42,7 +42,7 @@ func TestThrottlerlogzHandler_NonExistantThrottler(t *testing.T) { throttlerlogzHandler(response, request, newManager()) if got, want := response.Body.String(), `throttler: t1 does not exist`; !strings.Contains(got, want) { - t.Fatalf("/throttlerlogz page for non-existant t1 should not succeed. got = %v, want = %v", got, want) + t.Fatalf("/throttlerlogz page for non-existent t1 should not succeed. got = %v, want = %v", got, want) } } diff --git a/go/vt/vtctl/vtctl.go b/go/vt/vtctl/vtctl.go index 60332971374..94cb8744a61 100644 --- a/go/vt/vtctl/vtctl.go +++ b/go/vt/vtctl/vtctl.go @@ -337,7 +337,7 @@ var commands = []commandGroup{ "Displays all of the shards in the specified keyspace."}, {"WaitForDrain", commandWaitForDrain, "[-timeout ] [-retry_delay ] [-initial_wait ] ", - "Blocks until no new queries were observed on all tablets with the given tablet type in the specifed keyspace. " + + "Blocks until no new queries were observed on all tablets with the given tablet type in the specified keyspace. " + " This can be used as sanity check to ensure that the tablets were drained after running vtctl MigrateServedTypes " + " and vtgate is no longer using them. If -timeout is set, it fails when the timeout is reached."}, }, diff --git a/go/vt/vtctl/vtctlclient/interface.go b/go/vt/vtctl/vtctlclient/interface.go index 634879eac38..1626505e9a7 100644 --- a/go/vt/vtctl/vtctlclient/interface.go +++ b/go/vt/vtctl/vtctlclient/interface.go @@ -28,7 +28,7 @@ import ( "vitess.io/vitess/go/vt/logutil" ) -// vtctlClientProtocol specifices which RPC client implementation should be used. +// vtctlClientProtocol specifics which RPC client implementation should be used. var vtctlClientProtocol = flag.String("vtctl_client_protocol", "grpc", "the protocol to use to talk to the vtctl server") // VtctlClient defines the interface used to send remote vtctl commands diff --git a/go/vt/vtgate/buffer/buffer.go b/go/vt/vtgate/buffer/buffer.go index ca9e9eeb399..9967e1b701c 100644 --- a/go/vt/vtgate/buffer/buffer.go +++ b/go/vt/vtgate/buffer/buffer.go @@ -77,7 +77,7 @@ type Buffer struct { // shards is a set of keyspace/shard entries to which buffering is limited. // If empty (and *enabled==true), buffering is enabled for all shards. shards map[string]bool - // now returns the current time. Overriden in tests. + // now returns the current time. Overridden in tests. now func() time.Time // bufferSizeSema limits how many requests can be buffered @@ -134,7 +134,7 @@ func newWithNow(now func() time.Time) *Buffer { limited = header + limited dryRunOverride := "" if *enabledDryRun { - dryRunOverride = " Dry-run mode is overriden for these entries and actual buffering will take place." + dryRunOverride = " Dry-run mode is overridden for these entries and actual buffering will take place." } log.Infof("%v.%v", limited, dryRunOverride) } diff --git a/go/vt/vtgate/engine/merge_sort_test.go b/go/vt/vtgate/engine/merge_sort_test.go index 99a53a3f7a2..9ef8dfbfd9d 100644 --- a/go/vt/vtgate/engine/merge_sort_test.go +++ b/go/vt/vtgate/engine/merge_sort_test.go @@ -266,7 +266,7 @@ func TestMergeSortResultFailures(t *testing.T) { } func TestMergeSortDataFailures(t *testing.T) { - // The first row being bad fails in a differnt code path than + // The first row being bad fails in a different code path than // the case of subsequent rows. So, test the two cases separately. idColFields := sqltypes.MakeTestFields("id|col", "int32|varchar") vc := &streamVCursor{ @@ -329,7 +329,7 @@ type streamVCursor struct { } // StreamExecuteMulti streams a result from the specified shard. -// The shard is specifed by the only entry in shardVars. At the +// The shard is specified by the only entry in shardVars. At the // end of a stream, if sendErr is set, that error is returned. func (t *streamVCursor) StreamExecuteMulti(query string, rss []*srvtopo.ResolvedShard, bindVars []map[string]*querypb.BindVariable, callback func(reply *sqltypes.Result) error) error { shard := rss[0].Target.Shard diff --git a/go/vt/vtgate/executor_stats.go b/go/vt/vtgate/executor_stats.go index 7b9d45f9040..6fd6170ca5c 100644 --- a/go/vt/vtgate/executor_stats.go +++ b/go/vt/vtgate/executor_stats.go @@ -94,7 +94,7 @@ function drawQPSChart() { var idx = qps[planTypes[j]].length - i - 1; datum.push(+qps[planTypes[j]][idx].toFixed(2)); } else { - // Assume 0.0 QPS for older, non-existant data points. + // Assume 0.0 QPS for older, non-existent data points. datum.push(0); } } diff --git a/go/vt/vtgate/executor_test.go b/go/vt/vtgate/executor_test.go index 6cb3f71f8e4..f66ed617d90 100644 --- a/go/vt/vtgate/executor_test.go +++ b/go/vt/vtgate/executor_test.go @@ -667,7 +667,7 @@ func TestExecutorShow(t *testing.T) { } if len(sbclookup.Queries) != 1 { - t.Errorf("Tablet should have recieved one 'show' query. Instead received: %v", sbclookup.Queries) + t.Errorf("Tablet should have received one 'show' query. Instead received: %v", sbclookup.Queries) } else { lastQuery := sbclookup.Queries[len(sbclookup.Queries)-1].Sql want := "show tables" diff --git a/go/vt/vtgate/planbuilder/select.go b/go/vt/vtgate/planbuilder/select.go index e75685d6117..f1ec12fba2f 100644 --- a/go/vt/vtgate/planbuilder/select.go +++ b/go/vt/vtgate/planbuilder/select.go @@ -269,7 +269,7 @@ func (pb *primitiveBuilder) expandStar(inrcs []*resultColumn, expr *sqlparser.St for _, col := range t.columnNames { var expr *sqlparser.AliasedExpr if singleTable { - // If there's only one table, we use unqualifed column names. + // If there's only one table, we use unqualified column names. expr = &sqlparser.AliasedExpr{ Expr: &sqlparser.ColName{ Metadata: t.columns[col.Lowered()], diff --git a/go/vt/vtgate/planbuilder/symtab.go b/go/vt/vtgate/planbuilder/symtab.go index 0127661ffbe..bc2744bb8ac 100644 --- a/go/vt/vtgate/planbuilder/symtab.go +++ b/go/vt/vtgate/planbuilder/symtab.go @@ -40,7 +40,7 @@ var errNoTable = errors.New("no table info") // vindex column names. These names can be resolved without the // need to qualify them by their table names. If there are // duplicates during a merge, those columns are removed from -// the unique list, thereby disallowing unqualifed references +// the unique list, thereby disallowing unqualified references // to such columns. // // After a select expression is analyzed, the diff --git a/go/vt/vtgate/safe_session.go b/go/vt/vtgate/safe_session.go index ea8ca4f06ef..7657a9654ab 100644 --- a/go/vt/vtgate/safe_session.go +++ b/go/vt/vtgate/safe_session.go @@ -52,7 +52,7 @@ type SafeSession struct { // be issued if the state is autocommitable, // implying that no intermediate transactions were started. // If so, the state transitions to autocommited, which is terminal. -// If the token is succesfully issued, the caller has to perform +// If the token is successfully issued, the caller has to perform // the commit. If a token cannot be issued, then a traditional // commit has to be performed at the outermost level where // the autocommitable transition happened. diff --git a/go/vt/vtgate/scatter_conn.go b/go/vt/vtgate/scatter_conn.go index 3d0b5c71a2d..3bc5cb796e8 100644 --- a/go/vt/vtgate/scatter_conn.go +++ b/go/vt/vtgate/scatter_conn.go @@ -718,7 +718,7 @@ func injectShuffleQueryPartsRandomGenerator( } // shuffleQueryParts performs an in-place shuffle of the given array. -// The result is a psuedo-random permutation of the array chosen uniformally +// The result is a pseudo-random permutation of the array chosen uniformally // from the space of all permutations. func shuffleQueryParts(splits []*vtgatepb.SplitQueryResponse_Part) { for i := len(splits) - 1; i >= 1; i-- { diff --git a/go/vt/vtqueryserver/vtqueryserver.go b/go/vt/vtqueryserver/vtqueryserver.go index 722a3ce49ad..b300c463130 100644 --- a/go/vt/vtqueryserver/vtqueryserver.go +++ b/go/vt/vtqueryserver/vtqueryserver.go @@ -51,7 +51,7 @@ var ( func initProxy(dbcfgs *dbconfigs.DBConfigs) (*tabletserver.TabletServer, error) { target.Keyspace = *targetKeyspace - log.Infof("initalizing vtqueryserver.Proxy for target %s", target.Keyspace) + log.Infof("initializing vtqueryserver.Proxy for target %s", target.Keyspace) // creates and registers the query service qs := tabletserver.NewTabletServerWithNilTopoServer(tabletenv.Config) diff --git a/go/vt/vttablet/endtoend/config_test.go b/go/vt/vttablet/endtoend/config_test.go index 7fa175faa2e..cb47068c47d 100644 --- a/go/vt/vttablet/endtoend/config_test.go +++ b/go/vt/vttablet/endtoend/config_test.go @@ -36,7 +36,7 @@ func compareIntDiff(end map[string]interface{}, tag string, start map[string]int return verifyIntValue(end, tag, framework.FetchInt(start, tag)+diff) } -// verifyIntValue retuns an error if values[tag] != want. +// verifyIntValue returns an error if values[tag] != want. func verifyIntValue(values map[string]interface{}, tag string, want int) error { got := framework.FetchInt(values, tag) if got != want { diff --git a/go/vt/vttablet/endtoend/framework/eventcatcher.go b/go/vt/vttablet/endtoend/framework/eventcatcher.go index 209867325eb..3465bce8e88 100644 --- a/go/vt/vttablet/endtoend/framework/eventcatcher.go +++ b/go/vt/vttablet/endtoend/framework/eventcatcher.go @@ -58,7 +58,7 @@ type QueryCatcher struct { catcher *eventCatcher } -// NewQueryCatcher sets up the capture and retuns a QueryCatcher. +// NewQueryCatcher sets up the capture and returns a QueryCatcher. // You must call Close when done. func NewQueryCatcher() QueryCatcher { return QueryCatcher{catcher: newEventCatcher(tabletenv.StatsLogger)} diff --git a/go/vt/vttablet/tabletmanager/action_agent.go b/go/vt/vttablet/tabletmanager/action_agent.go index d6a406a3257..7fe05a7b5b3 100644 --- a/go/vt/vttablet/tabletmanager/action_agent.go +++ b/go/vt/vttablet/tabletmanager/action_agent.go @@ -104,7 +104,7 @@ type ActionAgent struct { statsTabletType *stats.String // statsTabletTypeCount exposes the current tablet type as a label, - // with the value counting the occurances of the respective tablet type. + // with the value counting the occurrences of the respective tablet type. // Useful for Prometheus which doesn't support exporting strings as stat values // only used if exportStats is true. statsTabletTypeCount *stats.CountersWithSingleLabel diff --git a/go/vt/vttablet/tabletmanager/healthcheck.go b/go/vt/vttablet/tabletmanager/healthcheck.go index cf187767741..ff4614079a1 100644 --- a/go/vt/vttablet/tabletmanager/healthcheck.go +++ b/go/vt/vttablet/tabletmanager/healthcheck.go @@ -284,7 +284,7 @@ func (agent *ActionAgent) runHealthCheckLocked() { } // All master tablets have to run the VReplication engine. - // There is no guarantee that VREngine was succesfully started when tabletmanager + // There is no guarantee that VREngine was successfully started when tabletmanager // came up. This is because the mysql could have been in read-only mode, etc. // So, start the engine if it's not already running. if tablet.Type == topodatapb.TabletType_MASTER && !agent.VREngine.IsOpen() { diff --git a/go/vt/vttablet/tabletmanager/rpc_server.go b/go/vt/vttablet/tabletmanager/rpc_server.go index 4720ae1a8b7..de903e30d75 100644 --- a/go/vt/vttablet/tabletmanager/rpc_server.go +++ b/go/vt/vttablet/tabletmanager/rpc_server.go @@ -52,7 +52,7 @@ func (agent *ActionAgent) lock(ctx context.Context) error { } } -// unlock is the symetrical action to lock. +// unlock is the symmetrical action to lock. func (agent *ActionAgent) unlock() { agent.actionMutexLocked = false agent.actionMutex.Unlock() diff --git a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go index 5bba8d43940..27f2d31d676 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/engine_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/engine_test.go @@ -69,7 +69,7 @@ func TestEngineOpen(t *testing.T) { // Verify stats if !reflect.DeepEqual(globalStats.controllers, vre.controllers) { - t.Errorf("stats are mismatched: %v, wnat %v", globalStats.controllers, vre.controllers) + t.Errorf("stats are mismatched: %v, want %v", globalStats.controllers, vre.controllers) } ct := vre.controllers[1] @@ -130,7 +130,7 @@ func TestEngineExec(t *testing.T) { // Verify stats if !reflect.DeepEqual(globalStats.controllers, vre.controllers) { - t.Errorf("stats are mismatched: %v, wnat %v", globalStats.controllers, vre.controllers) + t.Errorf("stats are mismatched: %v, want %v", globalStats.controllers, vre.controllers) } // Test Update @@ -172,7 +172,7 @@ func TestEngineExec(t *testing.T) { // Verify stats if !reflect.DeepEqual(globalStats.controllers, vre.controllers) { - t.Errorf("stats are mismatched: %v, wnat %v", globalStats.controllers, vre.controllers) + t.Errorf("stats are mismatched: %v, want %v", globalStats.controllers, vre.controllers) } // Test Delete @@ -233,7 +233,7 @@ func TestEngineBadInsert(t *testing.T) { // Verify stats if !reflect.DeepEqual(globalStats.controllers, vre.controllers) { - t.Errorf("stats are mismatched: %v, wnat %v", globalStats.controllers, vre.controllers) + t.Errorf("stats are mismatched: %v, want %v", globalStats.controllers, vre.controllers) } } diff --git a/go/vt/vttablet/tabletserver/rules/map_test.go b/go/vt/vttablet/tabletserver/rules/map_test.go index 1e788e228fb..b47715612cc 100644 --- a/go/vt/vttablet/tabletserver/rules/map_test.go +++ b/go/vt/vttablet/tabletserver/rules/map_test.go @@ -83,7 +83,7 @@ func TestMapSetRulesWithNil(t *testing.T) { t.Errorf("GetRules failed to retrieve blacklistQueryRules that has been set: %s", err) } if !reflect.DeepEqual(qrs, blacklistRules) { - t.Errorf("blacklistQueryRules retrived is %v, but the expected value should be %v", qrs, blacklistQueryRules) + t.Errorf("blacklistQueryRules retrieved is %v, but the expected value should be %v", qrs, blacklistQueryRules) } qri.SetRules(blacklistQueryRules, nil) @@ -93,7 +93,7 @@ func TestMapSetRulesWithNil(t *testing.T) { t.Errorf("GetRules failed to retrieve blacklistQueryRules that has been set: %s", err) } if !reflect.DeepEqual(qrs, New()) { - t.Errorf("blacklistQueryRules retrived is %v, but the expected value should be %v", qrs, blacklistQueryRules) + t.Errorf("blacklistQueryRules retrieved is %v, but the expected value should be %v", qrs, blacklistQueryRules) } } @@ -142,7 +142,7 @@ func TestMapGetSetQueryRules(t *testing.T) { t.Errorf("GetRules failed to retrieve blacklistQueryRules that has been set: %s", err) } if !reflect.DeepEqual(qrs, blacklistRules) { - t.Errorf("blacklistQueryRules retrived is %v, but the expected value should be %v", qrs, blacklistRules) + t.Errorf("blacklistQueryRules retrieved is %v, but the expected value should be %v", qrs, blacklistRules) } qrs, err = qri.Get(blacklistQueryRules) @@ -150,7 +150,7 @@ func TestMapGetSetQueryRules(t *testing.T) { t.Errorf("GetRules failed to retrieve blacklistQueryRules that has been set: %s", err) } if !reflect.DeepEqual(qrs, blacklistRules) { - t.Errorf("blacklistQueryRules retrived is %v, but the expected value should be %v", qrs, blacklistRules) + t.Errorf("blacklistQueryRules retrieved is %v, but the expected value should be %v", qrs, blacklistRules) } qrs, err = qri.Get(customQueryRules) @@ -158,7 +158,7 @@ func TestMapGetSetQueryRules(t *testing.T) { t.Errorf("GetRules failed to retrieve customQueryRules that has been set: %s", err) } if !reflect.DeepEqual(qrs, otherRules) { - t.Errorf("customQueryRules retrived is %v, but the expected value should be %v", qrs, customQueryRules) + t.Errorf("customQueryRules retrieved is %v, but the expected value should be %v", qrs, customQueryRules) } } diff --git a/go/vt/vttablet/tabletserver/splitquery/equal_splits_algorithm.go b/go/vt/vttablet/tabletserver/splitquery/equal_splits_algorithm.go index d543b49a6be..eadf3f3c812 100644 --- a/go/vt/vttablet/tabletserver/splitquery/equal_splits_algorithm.go +++ b/go/vt/vttablet/tabletserver/splitquery/equal_splits_algorithm.go @@ -38,7 +38,7 @@ import ( // // The algorithm works by issuing a query to the database to find the minimum and maximum // elements of the split column in the table referenced by the given SQL query. Denote these -// by min and max, respecitvely. The algorithm then "splits" the interval [min, max] into +// by min and max, respectively. The algorithm then "splits" the interval [min, max] into // SplitParams.split_count sub-intervals of equal length: // [a_1, a_2], [a_2, a_3],..., [a_{split_count}, a_{split_count+1}], // where min=a_1 < a_2 < a_3 < ... < a_split_count < a_{split_count+1}=max. diff --git a/go/vt/vttablet/tabletserver/status.go b/go/vt/vttablet/tabletserver/status.go index ad8eaf7112b..5bea9a5e5c1 100644 --- a/go/vt/vttablet/tabletserver/status.go +++ b/go/vt/vttablet/tabletserver/status.go @@ -100,7 +100,7 @@ function drawQPSChart() { var idx = qps[planTypes[j]].length - i - 1; datum.push(+qps[planTypes[j]][idx].toFixed(2)); } else { - // Assume 0.0 QPS for older, non-existant data points. + // Assume 0.0 QPS for older, non-existent data points. datum.push(0); } } diff --git a/go/vt/vttablet/tabletserver/tabletserver.go b/go/vt/vttablet/tabletserver/tabletserver.go index b3d4566d8cb..64711af9b83 100644 --- a/go/vt/vttablet/tabletserver/tabletserver.go +++ b/go/vt/vttablet/tabletserver/tabletserver.go @@ -1411,7 +1411,7 @@ func (tsv *TabletServer) VStreamRows(ctx context.Context, target *querypb.Target // SplitQuery splits a query + bind variables into smaller queries that return a // subset of rows from the original query. This is the new version that supports multiple -// split columns and multiple split algortihms. +// split columns and multiple split algorithms. // See the documentation of SplitQueryRequest in proto/vtgate.proto for more details. func (tsv *TabletServer) SplitQuery( ctx context.Context, diff --git a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go index 85ce7a0f704..401125fbde3 100644 --- a/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go +++ b/go/vt/vttablet/tabletserver/txthrottler/tx_throttler.go @@ -240,7 +240,7 @@ func (t *TxThrottler) Close() { // Throttle should be called before a new transaction is started. // It returns true if the transaction should not proceed (the caller // should back off). Throttle requires that Open() was previously called -// successfuly. +// successfully. func (t *TxThrottler) Throttle() (result bool) { if !t.config.enabled { return false diff --git a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go index b0298a279d6..91e09e8f330 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go @@ -135,7 +135,7 @@ func (vs *vstreamer) parseEvents(ctx context.Context, events <-chan mysql.Binlog bufferedEvents []*binlogdatapb.VEvent curSize int ) - // Buffering only takes row lenghts into consideration. + // Buffering only takes row lengths into consideration. // Length of other events is considered negligible. // If a new row event causes the packet size to be exceeded, // all existing rows are sent without the new row. diff --git a/go/vt/vttime/clock.go b/go/vt/vttime/clock.go index 6347d0e8165..b648b3ab4fc 100644 --- a/go/vt/vttime/clock.go +++ b/go/vt/vttime/clock.go @@ -34,7 +34,7 @@ var ( // Clock returns the current time. type Clock interface { // Now returns the current time as Interval. - // This method should be thread safe (i.e. multipe go routines can + // This method should be thread safe (i.e. multiple go routines can // safely call this at the same time). // The returned interval is guaranteed to have earliest <= latest, // and all implementations enforce it. diff --git a/go/vt/worker/grpcvtworkerserver/server.go b/go/vt/worker/grpcvtworkerserver/server.go index 95e9e7b1df6..29891f65bdc 100644 --- a/go/vt/worker/grpcvtworkerserver/server.go +++ b/go/vt/worker/grpcvtworkerserver/server.go @@ -47,7 +47,7 @@ func NewVtworkerServer(wi *worker.Instance) *VtworkerServer { // ExecuteVtworkerCommand is part of the vtworkerdatapb.VtworkerServer interface func (s *VtworkerServer) ExecuteVtworkerCommand(args *vtworkerdatapb.ExecuteVtworkerCommandRequest, stream vtworkerservicepb.Vtworker_ExecuteVtworkerCommandServer) (err error) { - // Please note that this panic handler catches only panics occuring in the code below. + // Please note that this panic handler catches only panics occurring in the code below. // The actual execution of the vtworker command takes place in a new go routine // (started in Instance.setAndStartWorker()) which has its own panic handler. defer servenv.HandlePanic("vtworker", &err) diff --git a/go/vt/worker/key_resolver.go b/go/vt/worker/key_resolver.go index 2d63878c110..09d77c6dee7 100644 --- a/go/vt/worker/key_resolver.go +++ b/go/vt/worker/key_resolver.go @@ -33,7 +33,7 @@ import ( // This file defines the interface and implementations of sharding key resolvers. -// keyspaceIDResolver defines the interface that needs to be satisifed to get a +// keyspaceIDResolver defines the interface that needs to be satisfied to get a // keyspace ID from a database row. type keyspaceIDResolver interface { // keyspaceID takes a table row, and returns the keyspace id as bytes. diff --git a/go/vt/worker/legacy_split_clone.go b/go/vt/worker/legacy_split_clone.go index 9745e2c01e8..a191a1b79d3 100644 --- a/go/vt/worker/legacy_split_clone.go +++ b/go/vt/worker/legacy_split_clone.go @@ -289,7 +289,7 @@ func (scw *LegacySplitCloneWorker) init(ctx context.Context) error { scw.wr.Logger().Infof("Found overlapping shards: %+v\n", os) // one side should have served types, the other one none, - // figure out wich is which, then double check them all + // figure out which is which, then double check them all leftServingTypes, err := scw.wr.TopoServer().GetShardServingTypes(ctx, os.Left[0]) if err != nil { diff --git a/go/vt/worker/multi_split_diff.go b/go/vt/worker/multi_split_diff.go index b4ab8cf9cea..9a93ca1e192 100644 --- a/go/vt/worker/multi_split_diff.go +++ b/go/vt/worker/multi_split_diff.go @@ -41,7 +41,7 @@ import ( "vitess.io/vitess/go/vt/vtgate/vindexes" ) -// Scanners encapsulates a source and a destination. We create one of these per paralell runner. +// Scanners encapsulates a source and a destination. We create one of these per parallel runner. type Scanners struct { // this is how we get data from the source shard sourceScanner TableScanner diff --git a/go/vt/worker/restartable_result_reader.go b/go/vt/worker/restartable_result_reader.go index be0e7568879..04f95695fc6 100644 --- a/go/vt/worker/restartable_result_reader.go +++ b/go/vt/worker/restartable_result_reader.go @@ -168,7 +168,7 @@ func (r *RestartableResultReader) getTablet() (bool, error) { return false /* retryable */, nil } -// startStream assumes that getTablet() was succesfully called before and now +// startStream assumes that getTablet() was successfully called before and now // tries to connect to the set tablet and start the streaming query. // If the method returns an error, the first return value specifies if it is // okay to retry. diff --git a/go/vt/worker/restartable_result_reader_test.go b/go/vt/worker/restartable_result_reader_test.go index 95c09a5cd46..2e1d301f1ff 100644 --- a/go/vt/worker/restartable_result_reader_test.go +++ b/go/vt/worker/restartable_result_reader_test.go @@ -136,7 +136,7 @@ func TestGenerateQuery(t *testing.T) { want: "SELECT `a`,`b`,`msg1`,`msg2` FROM `t1` WHERE `a`>=11 AND `a`<26 ORDER BY `a`,`b`", }, { - desc: "start overriden by last row (multi-column primary key)", + desc: "start overridden by last row (multi-column primary key)", start: sqltypes.NewInt64(11), end: sqltypes.NewInt64(26), table: "t1", diff --git a/go/vt/worker/split_clone.go b/go/vt/worker/split_clone.go index c063c508b07..8b8cd2d00ef 100644 --- a/go/vt/worker/split_clone.go +++ b/go/vt/worker/split_clone.go @@ -592,7 +592,7 @@ func (scw *SplitCloneWorker) initShardsForHorizontalResharding(ctx context.Conte scw.wr.Logger().Infof("Found overlapping shards: %+v\n", os) // one side should have served types, the other one none, - // figure out wich is which, then double check them all + // figure out which is which, then double check them all leftServingTypes, err := scw.wr.TopoServer().GetShardServingTypes(ctx, os.Left[0]) if err != nil { return fmt.Errorf("cannot get shard serving cells for: %v", os.Left[0]) diff --git a/go/vt/worker/split_clone_test.go b/go/vt/worker/split_clone_test.go index 7e73330b273..88a83ae6e18 100644 --- a/go/vt/worker/split_clone_test.go +++ b/go/vt/worker/split_clone_test.go @@ -829,7 +829,7 @@ func TestSplitCloneV2_Offline_Reconciliation(t *testing.T) { tc.rightMasterQs.modifyFirstRows(2) // The destination tablets should see inserts, updates and deletes. - // Clear the entries added by setUp() because the reconcilation will + // Clear the entries added by setUp() because the reconciliation will // produce different statements in this test case. tc.leftMasterFakeDb.DeleteAllEntries() tc.rightMasterFakeDb.DeleteAllEntries() diff --git a/go/vt/worker/vtworkerclient/interface.go b/go/vt/worker/vtworkerclient/interface.go index b7796de18e4..b35766b0540 100644 --- a/go/vt/worker/vtworkerclient/interface.go +++ b/go/vt/worker/vtworkerclient/interface.go @@ -27,7 +27,7 @@ import ( "vitess.io/vitess/go/vt/vterrors" ) -// protocol specifices which RPC client implementation should be used. +// protocol specifics which RPC client implementation should be used. var protocol = flag.String("vtworker_client_protocol", "grpc", "the protocol to use to talk to the vtworker server") // Client defines the interface used to send remote vtworker commands diff --git a/go/vt/workflow/manager_test.go b/go/vt/workflow/manager_test.go index 03192f45b7f..0620b882838 100644 --- a/go/vt/workflow/manager_test.go +++ b/go/vt/workflow/manager_test.go @@ -97,7 +97,7 @@ func TestManagerRestart(t *testing.T) { // Stop the manager. cancel() wg.Wait() - // Recreate the manager immitating restart. + // Recreate the manager imitating restart. m = NewManager(ts) // Make sure the workflow is still in the topo server. This diff --git a/go/vt/workflow/node_test.go b/go/vt/workflow/node_test.go index 8ac5a19da22..fec0b518b88 100644 --- a/go/vt/workflow/node_test.go +++ b/go/vt/workflow/node_test.go @@ -48,7 +48,7 @@ func (tw *testWorkflow) Action(ctx context.Context, path, name string) error { } // TestNodeManagerWithRoot unit tests basic NodeManager functionality -// wiht a single root node. +// with a single root node. func TestNodeManagerWithRoot(t *testing.T) { nodeManager := NewNodeManager() tw := &testWorkflow{} diff --git a/go/vt/workflow/resharding/workflow.go b/go/vt/workflow/resharding/workflow.go index 0061bdcab92..dedd4f7989b 100644 --- a/go/vt/workflow/resharding/workflow.go +++ b/go/vt/workflow/resharding/workflow.go @@ -378,7 +378,7 @@ func (hw *horizontalReshardingWorkflow) Run(ctx context.Context, manager *workfl if err := hw.runWorkflow(); err != nil { return err } - hw.setUIMessage(fmt.Sprintf("Horizontal Resharding is finished sucessfully.")) + hw.setUIMessage(fmt.Sprintf("Horizontal Resharding is finished successfully.")) return nil } diff --git a/go/vt/wrangler/reparent.go b/go/vt/wrangler/reparent.go index 88aa0132795..06b99e21f32 100644 --- a/go/vt/wrangler/reparent.go +++ b/go/vt/wrangler/reparent.go @@ -555,7 +555,7 @@ func (maxPosSearch *maxReplPosSearch) processTablet(tablet *topodatapb.Tablet) { maxPosSearch.maxPosLock.Unlock() } -// chooseNewMaster finds a tablet that is going to become master after reparent. The criterias +// chooseNewMaster finds a tablet that is going to become master after reparent. The criteria // for the new master-elect are (preferably) to be in the same cell as the current master, and // to be different from avoidMasterTabletAlias. The tablet with the largest replication // position is chosen to minimize the time of catching up with the master. Note that the search @@ -649,7 +649,7 @@ func (wr *Wrangler) emergencyReparentShardLocked(ctx context.Context, ev *events } // Deal with the old master: try to remote-scrap it, if it's - // truely dead we force-scrap it. Remove it from our map in any case. + // truly dead we force-scrap it. Remove it from our map in any case. if shardInfo.HasMaster() { deleteOldMaster := true shardInfoMasterAliasStr := topoproto.TabletAliasString(shardInfo.MasterAlias)