Add vstream metrics to vtgate#13098
Conversation
Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
|
@twthorn one other thing... we do need to document these new metrics. Can you please open a website PR here: https://github.com/vitessio/website for that? We would add them to this file: https://vitess.io/docs/17.0/reference/vreplication/metrics/ And we could potentially mention them here: https://vitess.io/docs/17.0/reference/vreplication/vstream/ Once the PR is created please link it in the description here as well. Then the next reviewer will see that this related and required work is also done. Thanks again! P.S. Let me know if you need any help with the docs PR. |
Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
|
@twthorn it looks like the new unit test may be flaky: It may have been a knock on failure from a previous test though. Does this pass 20 times in a row locally for you? That's an example of what I would normally do to try and avoid introducing a new flaky test. Along with re-running the relevant workflow in the CI 5+ times. |
|
So running the test by itself is fine. But if we run all of them from the package then I can see the data races and failures locally: The data races, I believe from my local testing, are fixed with this patch if you want to add it here: Then that leaves us with the fact that we seem to be reading unprocessed messages left over in the vstream from the previous Skew test. We'll have to either drain the channel first, or accept/ignore additional values. |
Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
|
@mattlord Thank you for the help! Updated with your suggestions |
|
I'm going to override the test requirements and merge, as |
* Add vstream metrics to vtgate Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Update unit test name and use cell variable Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Reset metrics for TestVStreamsCreatedAndLagMetrics, fix data race issue Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> --------- Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
* Add vstream metrics to vtgate * Update unit test name and use cell variable * Reset metrics for TestVStreamsCreatedAndLagMetrics, fix data race issue --------- Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
* Add vstream metrics to vtgate Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Update unit test name and use cell variable Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Reset metrics for TestVStreamsCreatedAndLagMetrics, fix data race issue Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> --------- Signed-off-by: twthorn <thomaswilliamthornton@gmail.com>
* Add `VStreamerCount` stat to `vttablet` (vitessio#11978) * Add `VStreamersActive` stat to `vttablet` Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Improve desc Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Add PR suggestions Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Move to *stats.Gauge Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Single defer Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Add `Uptime` metric (vitessio#12712) * Add `Uptime` metric to `vtgate`+`vttablet` Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * move to go/vt/servenv/status.go Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Use nanoseconds for uptime Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Move Uptime metrics to servenv.go, remove dupe start time.Time Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Use serverStart time.Time Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Implement the RowsColumnTypeScanType interface in the go sql driver for Vitess in order to get the column types (vitessio#12007) Signed-off-by: Johan Oskarsson <joskarsson@slack-corp.com> Signed-off-by: Johan Oskarsson <joskarsson@slack-corp.com> Co-authored-by: Johan Oskarsson <joskarsson@slack-corp.com> * Add vstream metrics to vtgate (vitessio#13098) * Add vstream metrics to vtgate Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Update unit test name and use cell variable Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * Reset metrics for TestVStreamsCreatedAndLagMetrics, fix data race issue Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> --------- Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> * add lock to flaky TestValidateVersionShard test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * typo Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Signed-off-by: Johan Oskarsson <joskarsson@slack-corp.com> Signed-off-by: twthorn <thomaswilliamthornton@gmail.com> Co-authored-by: Johan Oskarsson <johan@oskarsson.nu> Co-authored-by: Johan Oskarsson <joskarsson@slack-corp.com> Co-authored-by: Thomas Thornton <thomaswilliamthornton@gmail.com>
Description
Add vstream metrics (number of vstreams, vstream lag) for vtgate.
PR to update docs: vitessio/website#1473
Related Issue(s)
Fixes #13099
Checklist
Deployment Notes