Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Tablet stats new log lines #146

Open
wants to merge 150 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
8f0bc14
add an error log if creating the app connection fails
demmer Jan 3, 2018
f786a06
add a reusable mysqlproxy module
demmer Jan 8, 2018
5e7254e
add vtqueryserver
demmer Jan 8, 2018
bb33739
resolve upstream conflict
demmer Jan 24, 2018
e1fdd3e
refactor vtqueryserver startup to enable testing
demmer Jan 26, 2018
a75a754
add initial end to end test for vtqueryserver
demmer Jan 26, 2018
45ad926
rework the proxy implementation of autocommit to match mysql
demmer Jan 27, 2018
2b3048f
add accessors to set PassthroughDMLs and AllowUnsafeDMLs
demmer Jan 27, 2018
0ea8013
add vtqueryserver tests for passthrough DMLs
demmer Jan 27, 2018
bc7ffa9
add vtqueryserver flag for allow_unsafe_dmls
demmer Jan 27, 2018
4a44d25
add proxy support for other statements
demmer Jan 29, 2018
d48e84a
Merge branch 'vtqueryserver' into slack-sync-upstream-2018-01-29
demmer Jan 29, 2018
732edb1
Merge pull request #67 from tinyspeck/slack-sync-upstream-2018-01-29
demmer Jan 29, 2018
b6703a7
remove debugging printf
demmer Jan 31, 2018
80d72ac
Merge pull request #68 from tinyspeck/vtqueryserver-remove-stray-comment
rafael Jan 31, 2018
2c103b7
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Feb 5, 2018
edc17cd
Merge pull request #70 from tinyspeck/slack-sync-upstream-2018-02-05
demmer Feb 5, 2018
c45710b
add support for `USING <identifier>` to CREATE TABLE
demmer Feb 6, 2018
30c6a69
Add support for trailing comments in begin/commit/rollback statements
rafael Jan 31, 2018
12124b0
nit - only get trimmed comments when needed
rafael Feb 1, 2018
028ab88
Added comment per code review
rafael Feb 1, 2018
8ad6f9a
nit - improve comment
rafael Feb 1, 2018
5284aee
Rewrote comment to make it clearer
rafael Feb 1, 2018
713273a
Merge pull request #71 from tinyspeck/slack-sync-upstream/2018-02-07
rafael Feb 7, 2018
71d4662
Fix for show vindexes, not picking the correct stat
rafael Feb 3, 2018
0ce5f56
Merge pull request #72 from tinyspeck/slack-sync-upstream/2018-02-07
rafael Feb 7, 2018
1faab99
Revert "Merge pull request #71 from tinyspeck/slack-sync-upstream/201…
demmer Feb 15, 2018
087bf39
Revert "Merge pull request #72 from tinyspeck/slack-sync-upstream/201…
demmer Feb 15, 2018
ac980b0
Revert "Merge pull request #68 from tinyspeck/vtqueryserver-remove-st…
demmer Feb 15, 2018
6a6c28f
Revert "Merge branch 'vtqueryserver' into slack-sync-upstream-2018-01…
demmer Feb 15, 2018
4c9950e
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Feb 15, 2018
406223d
Merge pull request #73 from tinyspeck/slack-sync-upstream-2018-02-14
rafael Feb 15, 2018
a3740e4
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Feb 27, 2018
dbf4e3c
Merge pull request #75 from tinyspeck/slack-sync-upstream-2018-02-27
demmer Feb 27, 2018
56bcfc0
Merge remote-tracking branch 'upstream/master' into HEAD
demmer Feb 28, 2018
2e0839f
Merge pull request #77 from tinyspeck/slack-sync-upstream-2018-02-28
demmer Mar 2, 2018
e444aa9
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
rafael Mar 13, 2018
1e434d5
Merge pull request #80 from tinyspeck/slack-sync-upstream-2018-03-13
rafael Mar 13, 2018
48058d7
Update vendor.json with the `promhttp` package and a newer `prometheus`
zmagg Mar 20, 2018
d2ae8b1
Merge pull request #81 from tinyspeck/zmagg_prom_vendor
demmer Mar 20, 2018
076905a
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Mar 21, 2018
6603271
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Mar 21, 2018
6004768
update bootstrap script to include better diagnostics of versions
demmer Mar 21, 2018
1657d68
use consul version 1.0.6 in bootstrap
demmer Mar 21, 2018
d133945
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Mar 22, 2018
2b031e9
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Mar 22, 2018
cbf4d0a
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Mar 26, 2018
8e8ed6b
Merge pull request #82 from tinyspeck/slack-sync-upstream-2018-03-20
demmer Mar 26, 2018
f0a7ce8
Merge branch 'upstream-master' into slack-vitess-2018.03.26r1
rafael Mar 27, 2018
58dc112
Merge pull request #83 from tinyspeck/slack-vitess-2018.03.26r1
demmer Mar 27, 2018
6388917
Merge remote-tracking branch 'upstream/master' into slack-vitess-2018…
demmer Apr 18, 2018
849ffc3
Merge branch 'query-comment-multi-shard-autocommit' into slack-vitess…
demmer Apr 18, 2018
069b4c4
Merge pull request #84 from tinyspeck/slack-vitess-2018-04-18
demmer Apr 18, 2018
3a56abf
Merge pull request #85 from tinyspeck/slack-vitess-2018-04-23
zmagg Apr 23, 2018
a149d8c
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer May 6, 2018
021b5a1
Merge pull request #89 from tinyspeck/slack-sync-upstream-2018-05-06
demmer May 7, 2018
9d1f5ad
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer May 8, 2018
b5b4f25
Merge pull request #90 from tinyspeck/slack-sync-upstream-2018-05-08
demmer May 8, 2018
5c7c16a
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer May 18, 2018
270e40d
Merge pull request #91 from tinyspeck/slack-sync-upstream-2018.05.18r0
demmer May 18, 2018
a95cf5d
Merge branch 'upstream-master' into slack-sync-upstream-2018.05.18r1
rafael May 18, 2018
c0131dd
Merge pull request #92 from tinyspeck/slack-sync-upstream-2018.05.18r1
demmer May 18, 2018
912b77a
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer May 31, 2018
b37292c
Merge pull request #94 from tinyspeck/slack-sync-upstream-2018.05.31r0
demmer May 31, 2018
a843eca
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Jun 26, 2018
872c810
Merge remote-tracking branch 'upstream/master' into slack-sync-upstre…
demmer Jun 26, 2018
1bfab51
Merge pull request #95 from tinyspeck/slack-sync-upstream-2018.06.25r0
demmer Jun 27, 2018
7c02d4a
drop the "from" clause in "show tables from dbname like 'foo%'"
Jun 14, 2018
4db5146
re-add support for: show full columns from messages from test_keyspac…
Jun 28, 2018
d954c87
make 'columns' not reserved keyword
Jun 29, 2018
9bdf26d
Merge pull request #96 from tinyspeck/slack-sync-upstream-2018.06.25r1
rafael Jul 2, 2018
b6657a6
Merge pull request #98 from tinyspeck/slack-sync-upstream-2018.07.09r0
zmagg Jul 10, 2018
3c6edab
Fix bug found in dev: Orchestrator returns an empty length
zmagg Jul 11, 2018
fc6efa7
Merge pull request #99 from tinyspeck/fix-orc-empty-response-audit-re…
rafael Jul 16, 2018
a2eca07
Merge branch 'upstream-master' into slack-sync-upstream-2018.08.09r1
rafael Aug 9, 2018
ca9a475
Merge pull request #102 from tinyspeck/slack-sync-upstream-2018.08.09r1
rafael Aug 10, 2018
de3d57d
restore the deprecated user-specific "dbname" flags
demmer Aug 6, 2018
1852654
fix typo and use DeprecatedDBName properly
demmer Aug 6, 2018
bb9395b
Set the keepalive server-side enforcement policy min time, so that
zmagg Aug 10, 2018
eb89227
Change the flag name to respond to code review.
zmagg Aug 10, 2018
9b04fe0
Use the new variable name.
zmagg Aug 10, 2018
55fad60
Merge pull request #103 from tinyspeck/slack-sync-upstream-2018.08.09r2
rafael Aug 13, 2018
75f839c
add a callinfo implementation for the mysql server protocol
demmer Aug 23, 2018
01f13d7
rework the grpc callinfo to include the peer remote address
demmer Aug 23, 2018
5a0427e
Merge pull request #104 from tinyspeck/sync-grpc-improvements
demmer Aug 24, 2018
acde621
Flush binlog while doing a PlannedReparent
rafael Aug 28, 2018
977bad0
We want this to make it to the binlogs
rafael Aug 28, 2018
213d7bb
Need to implement interface in vtcombo
rafael Aug 28, 2018
105c0a4
Try backups with buffer io
rafael Aug 29, 2018
fafc339
Merge pull request #105 from tinyspeck/slack-flush-binlogs-reparent-2…
rafael Aug 29, 2018
3532aa5
Revert "Try backups with buffer io"
rafael Aug 29, 2018
29455c5
Merge pull request #106 from tinyspeck/revert-sneak-commit
rafael Aug 29, 2018
919d300
Revert "Need to implement interface in vtcombo"
rafael Sep 6, 2018
cc60d79
Revert "We want this to make it to the binlogs"
rafael Sep 6, 2018
6f4aa06
Revert "Flush binlog while doing a PlannedReparent"
rafael Sep 6, 2018
3aae38a
Merge pull request #108 from tinyspeck/revert-flush-binary-logs
rafael Sep 6, 2018
aa65baf
Merge pull request #109 from tinyspeck/slack-vitess-2018-09-06.r0
zmagg Sep 11, 2018
5a548fd
Initial import of change to parallelize backup compresion
ameetkotian Sep 17, 2018
fa2da1f
Merge pull request #111 from tinyspeck/slack-vitess-2018.10.02.r0
demmer Oct 2, 2018
90d7280
Follow the MySQL handshake protocol and send 10 NULL bytes
arthurnn Oct 12, 2018
21c6a53
Merge pull request #112 from tinyspeck/fix-null-10b-handshake-patch
demmer Oct 18, 2018
327fea1
Fix golint install in bootstrap.sh
Oct 12, 2018
98541a7
Merge pull request #113 from tinyspeck/fix-golint-install
demmer Oct 18, 2018
131fc36
Merge branch 'upstream-master' into slack-vitess-2018-10-29.r0
rafael Oct 29, 2018
47de436
Merge pull request #115 from tinyspeck/slack-vitess-2018-10-29.r0
rafael Oct 29, 2018
c8c34f4
change s3_backup_aws_region flag to `""`
Oct 30, 2018
b8316de
Improve warning so it's not that verbose.
rafael Oct 29, 2018
b865bb0
Merge pull request #116 from tinyspeck/slack-vitess-2018-10-29.r1
rafael Oct 30, 2018
b0bbbdb
Merge pull request #118 from tinyspeck/slack-vitess-2018-12-3.r0
rafael Dec 3, 2018
3dab956
Merge pull request #119 from tinyspeck/slack-vitess-2018-12-3.r1
rafael Dec 5, 2018
55a4edd
Merge remote-tracking branch 'upstream/master' into setassociative-me…
setassociative Dec 14, 2018
06241e2
Merge pull request #120 from tinyspeck/20181214-merge-upstream
setassociative Dec 14, 2018
6e4f991
List all tablets in all cells
rafael Dec 17, 2018
c8023fe
Refactor to not require a new command
rafael Dec 17, 2018
ac8d661
Add region context to aggr stats
rafael Dec 15, 2018
6e95f14
Adds tests for discovery gateway aggregate stats
rafael Dec 15, 2018
0befc7e
Change implementation to have aggregates per region
rafael Dec 16, 2018
a51c547
Refactor test to make it even more generic. Remove extra line in stru…
rafael Dec 16, 2018
4c147f5
Merge pull request #121 from tinyspeck/slack-sync-upstream-2018-12-17.r1
rafael Dec 17, 2018
4ec10eb
Revert "Refactor test to make it even more generic. Remove extra line…
rafael Dec 21, 2018
46d4d28
Revert "Change implementation to have aggregates per region"
rafael Dec 21, 2018
de85143
Revert "Adds tests for discovery gateway aggregate stats"
rafael Dec 21, 2018
49b98be
Revert "Add region context to aggr stats"
rafael Dec 21, 2018
3ca419e
Merge branch 'upstream-master' into slack-sync-upstream-2018-12-21.r1
rafael Dec 21, 2018
1a994d9
Merge pull request #123 from tinyspeck/slack-sync-upstream-2018-12-21.r1
rafael Jan 7, 2019
a74cdc1
Merge branch 'upstream-master' into slack-sync-vreplication-2019-01-29
rafael Jan 30, 2019
4a1cdfc
Merge branch 'upstream-master' into slack-sync-2019-01-30
rafael Jan 31, 2019
a2550c5
Merge pull request #125 from tinyspeck/slack-sync-2019-01-30
rafael Jan 31, 2019
f0d747a
Patch sqltypes.MakeRowTrusted to lean on field count (#126)
setassociative Feb 25, 2019
bf58a28
Merge pull request #127 from tinyspeck/slack-vitess-2019.03.19r0
zmagg Mar 22, 2019
e59cf9d
Fix potential nil pointer error
rafael Mar 28, 2019
191da8d
Merge pull request #128 from tinyspeck/slack-vitess-2019.03.19r1
rafael Mar 28, 2019
6351eba
Refactor region to aliases
rafael Mar 28, 2019
5021e65
Adds tests and fixes typo in vtctl command
rafael Apr 2, 2019
d082714
Merge branch 'upstream-master' into slack-vitess-2019-04-02.r0
rafael Apr 2, 2019
f6b9ff4
Merge branch 'upstream-master' into slack-vitess-2019-04-02.r0
rafael Apr 2, 2019
bf603d5
Merge pull request #129 from tinyspeck/slack-vitess-2019-04-02.r0
rafael Apr 3, 2019
36d71ca
merging upstream f93c96c into tinyspeck
brirams Jul 31, 2019
e983049
Merge pull request #136 from tinyspeck/bramos_force_upstream_f93c96c
brirams Aug 5, 2019
9bb5735
Merge branch 'master' of github.com:tinyspeck/vitess into tinyspeck-m…
Aug 26, 2019
77acf0a
Merge branch 'master' of github.com:tinyspeck/vitess
rafael Sep 12, 2019
554ab7f
Merge pull request #137 from tinyspeck/slack-vitess-2019.08.26.r0
arka-g Sep 12, 2019
8dd9c91
Merge branch 'master' of github.com:tinyspeck/vitess
rafael Sep 17, 2019
9b5de39
Merge commit 'e72b6ae'
Nov 22, 2019
2b6cb92
Merge branch 'upstream-master' into slack-sync-upstream-2019-12-11.r0
rafael Dec 11, 2019
45dd2e5
Merge pull request #142 from tinyspeck/slack-sync-upstream-2019-11-09.r0
rafael Dec 11, 2019
da548a7
Merge branch 'master' of github.com:tinyspeck/vitess
rafael Dec 11, 2019
6b666e7
Merge branch 'master' into slack-sync-upstream-2019-12-11.r0
rafael Dec 11, 2019
3d61060
Merge pull request #143 from tinyspeck/slack-sync-upstream-2019-12-11.r0
rafael Dec 11, 2019
6c9704b
Tablet stats new log lines
Feb 10, 2020
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
7 changes: 4 additions & 3 deletions go/sqltypes/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,14 @@ func ResultsEqual(r1, r2 []Result) bool {
// Every place this function is called, a comment is needed that explains
// why it's justified.
func MakeRowTrusted(fields []*querypb.Field, row *querypb.Row) []Value {
sqlRow := make([]Value, len(row.Lengths))
sqlRow := make([]Value, len(fields))
var offset int64
for i, length := range row.Lengths {
for i, fld := range fields {
length := row.Lengths[i]
if length < 0 {
continue
}
sqlRow[i] = MakeTrusted(fields[i].Type, row.Values[offset:offset+length])
sqlRow[i] = MakeTrusted(fld.Type, row.Values[offset:offset+length])
offset += length
}
return sqlRow
Expand Down
55 changes: 55 additions & 0 deletions go/sqltypes/result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,61 @@ import (
querypb "vitess.io/vitess/go/vt/proto/query"
)

func TestMakeRowTrusted(t *testing.T) {
fields := MakeTestFields(
"some_int|some_text|another_int",
"int8|varchar|int8",
)

values := []byte{}
hw := []byte("hello, world")
values = append(values, hw...)
values = append(values, byte(42))

row := &querypb.Row{
Lengths: []int64{-1, int64(len(hw)), 1},
Values: values,
}

want := []Value{
MakeTrusted(querypb.Type_NULL_TYPE, nil),
MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")),
MakeTrusted(querypb.Type_INT8, []byte{byte(42)}),
}

result := MakeRowTrusted(fields, row)
if !reflect.DeepEqual(result, want) {
t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want)
}
}

func TestMakeRowTrustedDoesNotPanicOnNewColumns(t *testing.T) {
fields := MakeTestFields(
"some_int|some_text",
"int8|varchar",
)

values := []byte{byte(123)}
hw := []byte("hello, world")
values = append(values, hw...)
values = append(values, byte(42))

row := &querypb.Row{
Lengths: []int64{1, int64(len(hw)), 1},
Values: values,
}

want := []Value{
MakeTrusted(querypb.Type_INT8, []byte{byte(123)}),
MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")),
}

result := MakeRowTrusted(fields, row)
if !reflect.DeepEqual(result, want) {
t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want)
}
}

func TestRepair(t *testing.T) {
fields := []*querypb.Field{{
Type: Int64,
Expand Down
5 changes: 5 additions & 0 deletions go/vt/discovery/tablet_stats_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,17 @@ func (tc *TabletStatsCache) StatsUpdate(ts *TabletStats) {
// values if necessary. (will update both
// 'all' and 'healthy' as they use pointers).
if !trivialNonMasterUpdate {
log.Infof("SLACK:tablet stats cache::master update - %+v", ts)
*existing = *ts
}
} else {
log.Infof("SLACK:tablet stats cache::removing tablet entry - %+v", ts)
// We have an entry which we shouldn't. Remove it.
delete(e.all, ts.Key)
}
} else {
if ts.Up {
log.Infof("SLACK:tablet stats cache::adding tablet - %+v", ts)
// Add the entry.
e.all[ts.Key] = ts
} else {
Expand All @@ -261,6 +264,7 @@ func (tc *TabletStatsCache) StatsUpdate(ts *TabletStats) {
for _, s := range e.all {
allArray = append(allArray, s)
}
log.Infof("SLACK:tablet stats cache::master healthy list - %v", allArray)
} else {
// For non-master, if it is a trivial update,
// we just skip everything else. We don't even update the
Expand All @@ -274,6 +278,7 @@ func (tc *TabletStatsCache) StatsUpdate(ts *TabletStats) {
for _, s := range e.all {
allArray = append(allArray, s)
}
log.Infof("SLACK:tablet stats cache::healthy list recomputed - %v", allArray)
e.healthy = FilterByReplicationLag(allArray)
}

Expand Down
22 changes: 22 additions & 0 deletions test/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,28 @@
"RetryMax": 0,
"Tags": []
},
"cell_no_aliases": {
"File": "cell_no_aliases.py",
"Args": [],
"Command": [],
"Manual": false,
"Shard": 1,
"RetryMax": 0,
"Tags": [
"site_test"
]
},
"cell_aliases": {
"File": "cell_aliases.py",
"Args": [],
"Command": [],
"Manual": false,
"Shard": 1,
"RetryMax": 0,
"Tags": [
"site_test"
]
},
"mysql_server": {
"File": "mysql_server_test.py",
"Args": [],
Expand Down