-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use the HealthCheckImpl
in vtctld
instead of the LegacyHealthCheck
#10254
Conversation
HealthCheckImpl
in vtctld
instead of the LegacyHealthCheck
0cb401d
to
b247433
Compare
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> Follow up on the intial vtctld API changes Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
… GetShardInKeyspace Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
6303718
to
3c0cebc
Compare
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
…hcheck Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Manual TestingHere is a preview of a couple of endpoints before and after the changes brought by this PR. Other endpoints have been manually tested too on both sharded and unsharded clusters, nothing to report. http://localhost:15000/api/tablet_health/zone1/100Before{
"Key": "localhost,grpc:16100,vt:15100",
"Tablet": {
"alias": {
"cell": "zone1",
"uid": 100
},
"hostname": "localhost",
"port_map": {
"grpc": 16100,
"vt": 15100
},
"keyspace": "commerce",
"shard": "0",
"type": 1,
"mysql_hostname": "localhost",
"mysql_port": 17100,
"primary_term_start_time": {
"seconds": 1653685533,
"nanoseconds": 104635000
},
"db_server_version": "8.0.28",
"default_conn_collation": 255
},
"Name": "zone1-0000000100",
"Target": {
"keyspace": "commerce",
"shard": "0",
"tablet_type": 1
},
"Up": true,
"Serving": true,
"TabletExternallyReparentedTimestamp": 1653685533,
"Stats": {},
"LastError": null
} After{
"Key": "localhost,grpc:16100,vt:15100",
"Tablet": {
"alias": {
"cell": "zone1",
"uid": 100
},
"hostname": "localhost",
"port_map": {
"grpc": 16100,
"vt": 15100
},
"keyspace": "commerce",
"shard": "0",
"type": 1,
"mysql_hostname": "localhost",
"mysql_port": 17100,
"primary_term_start_time": {
"seconds": 1653686352,
"nanoseconds": 49835000
},
"db_server_version": "8.0.28",
"default_conn_collation": 255
},
"Name": "zone1-0000000100",
"Target": {
"keyspace": "commerce",
"shard": "0",
"tablet_type": 1
},
"Up": true,
"Serving": true,
"PrimaryTermStartTime": 1653686352,
"TabletExternallyReparentedTimestamp": 1653686352,
"Stats": {},
"LastError": null
} http://localhost:15000/api/tablet_statuses/?keyspace=all&cell=all&type=all&metric=lagBefore[
{
"Data": [
[
0
]
],
"Aliases": null,
"KeyspaceLabel": {
"Name": "commerce",
"Rowspan": 1
},
"CellAndTypeLabels": [
{
"CellLabel": {
"Name": "zone1",
"Rowspan": 1
},
"TypeLabels": null
}
],
"ShardLabels": [
"0"
],
"YGridLines": [
0.5
]
}
] After[
{
"Data": [
[
0
]
],
"Aliases": null,
"KeyspaceLabel": {
"Name": "commerce",
"Rowspan": 1
},
"CellAndTypeLabels": [
{
"CellLabel": {
"Name": "zone1",
"Rowspan": 1
},
"TypeLabels": null
}
],
"ShardLabels": [
"0"
],
"YGridLines": [
0.5
]
}
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Everything looks good except for a few minor comments.
We can merge once those are addressed.
buildVarCharRow("aa", "TestExecutor", "-20", "PRIMARY", "SERVING", "aa-0000000001", "-20", "1970-01-01T00:00:01Z"), | ||
buildVarCharRow("aa", "TestXBadVSchema", "-20", "PRIMARY", "SERVING", "aa-0000000009", "random", "1970-01-01T00:00:01Z"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this needs to change in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use the FakeHealthCheck
in these tests. The implementation used to ignore the cell and use FakeCell
always, this was changed, so now the output of the test uses the real cell's name.
3cacac2
to
1b60423
Compare
…for v15 Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
1b60423
to
82d8658
Compare
…hcheck Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Description
This Pull Request removes the usage of the legacy healthcheck in the vtctld package. The new healthcheck implementation is used instead.
In the vtctld API, instead of having a realtime_stats and tablet_cache, we now only have a healthcheck implementation. Most of the code that lived in realtime_stats and tablet_cache and that was required by the new implementation got moved to
api_utils.go
Related Issue(s)
Checklist