Skip to content
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
2 changes: 1 addition & 1 deletion go/cmd/vtbackup/vtbackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/auth_server_static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/binlog_event_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/binlog_event_make.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/binlog_event_make_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions go/mysql/encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/mysql/endtoend/replication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions go/mysql/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ 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)
}
// 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")
}
}

Expand Down
2 changes: 1 addition & 1 deletion go/netutil/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/automation/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion go/vt/binlog/binlogplayer/binlog_player.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/binlog/keyrange_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion go/vt/dbconfigs/dbconfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion go/vt/discovery/replicationlag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions go/vt/mysqlctl/fakemysqldaemon/fakemysqldaemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion go/vt/proto/query/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/vt/proto/tabletmanagerservice/tabletmanagerservice.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/vt/proto/topodata/topodata.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go/vt/proto/vtrpc/vtrpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions go/vt/sqlannotation/sqlannotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/throttler/max_replication_lag_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/throttler/max_replication_lag_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go/vt/throttler/replication_lag_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(<non existant key>) should have returned a zero entry but did not: %v", zeroEntry)
t.Fatalf("atOrAfter(<non existent key>) should have returned a zero entry but did not: %v", zeroEntry)
}

// First entry at 1s.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/throttler/throttlerclient/throttlerclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion go/vt/throttler/throttlerlogz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/vtctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ var commands = []commandGroup{
"Displays all of the shards in the specified keyspace."},
{"WaitForDrain", commandWaitForDrain,
"[-timeout <duration>] [-retry_delay <duration>] [-initial_wait <duration>] <keyspace/shard> <served tablet type>",
"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."},
},
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtctl/vtctlclient/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/buffer/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/engine/merge_sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/executor_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/planbuilder/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down
Loading