vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.47k stars 2.09k forks source link

`mysqld` system metrics, with `TabletManager` rpc #16850

Open shlomi-noach opened 2 days ago

shlomi-noach commented 2 days ago

Description

Addresses https://github.com/vitessio/vitess/issues/16822. This is part of the multi-metrics throttler project.

Part 1, to be included in v21:

This is all wired in this PR, ie if you call tmclient. TabletManagerClient, you get the actual OS metrics read by MysqlDaemon.

However, for 1-version backwards compatibility, this code path is not used anywhere.

We wish to merge this in v21, and immediately follow up with a PR (designed for v22) where the tablet throttler collects these metrics. IT will do so sparsely.

Related Issue(s)

Checklist

Deployment Notes

vitess-bot[bot] commented 2 days ago

Review Checklist

Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.

General

Tests

Documentation

New flags

If a workflow is added or modified:

Backward compatibility

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 42.10526% with 55 lines in your changes missing coverage. Please review.

Project coverage is 69.41%. Comparing base (4058966) to head (338c52c).

Files with missing lines Patch % Lines
go/vt/mysqlctl/fakemysqldaemon.go 0.00% 11 Missing :warning:
go/vt/mysqlctl/mysqld.go 71.79% 11 Missing :warning:
go/vt/vttablet/grpctmclient/client.go 0.00% 9 Missing :warning:
go/vt/vttablet/grpctmserver/server.go 0.00% 7 Missing :warning:
go/vt/vttablet/tabletmanager/rpc_query.go 0.00% 7 Missing :warning:
go/vt/mysqlctl/grpcmysqlctlserver/server.go 0.00% 2 Missing :warning:
go/vt/vtcombo/tablet_map.go 0.00% 2 Missing :warning:
go/vt/vttablet/faketmclient/fake_client.go 0.00% 2 Missing :warning:
go/vt/vttablet/tabletserver/throttle/throttler.go 84.61% 2 Missing :warning:
go/vt/vttablet/tmrpctest/test_tm_rpc.go 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16850 +/- ## ========================================== - Coverage 69.44% 69.41% -0.03% ========================================== Files 1571 1571 Lines 202996 203081 +85 ========================================== Hits 140977 140977 - Misses 62019 62104 +85 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.