SHOW VITESS_REPLICATION_STATUS: Only use replication tracker when it's enabled#15348
Merged
mattlord merged 12 commits intovitessio:mainfrom Feb 26, 2024
Merged
SHOW VITESS_REPLICATION_STATUS: Only use replication tracker when it's enabled#15348mattlord merged 12 commits intovitessio:mainfrom
mattlord merged 12 commits intovitessio:mainfrom
Conversation
Signed-off-by: Matt Lord <mattalord@gmail.com>
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Matt Lord <mattalord@gmail.com>
96a506d to
5076415
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15348 +/- ##
==========================================
- Coverage 67.53% 65.43% -2.11%
==========================================
Files 1561 1561
Lines 193387 193531 +144
==========================================
- Hits 130607 126634 -3973
- Misses 62780 66897 +4117 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Matt Lord <mattalord@gmail.com>
shlomi-noach
approved these changes
Feb 25, 2024
This reverts commit 6d07ac2. CheckThrottler is a tmclient RPC can thus can't be called from a non-tablet. Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
As check?app=vtgate is only valid on a PRIMARY. Also, vtgate's don't interface directly with the tablet throttler so it doesn't make sense to use the vtgate app name. Signed-off-by: Matt Lord <mattalord@gmail.com>
769c764 to
266eccb
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
vitess-bot
pushed a commit
that referenced
this pull request
Feb 26, 2024
…s enabled (#15348) Signed-off-by: Matt Lord <mattalord@gmail.com>
vitess-bot
pushed a commit
that referenced
this pull request
Feb 26, 2024
…s enabled (#15348) Signed-off-by: Matt Lord <mattalord@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We added the
show vitess_replication_statusquery in #8900. At the time I chose to use the tablet's replication lag stats variable as we could get a more accurate representation of the lag than using mysqld'sseconds_behind_[master|source]value. The stat relied on polling — in which case we can also estimate the lag when replication is not running – or sub-second heartbeats, and it was more accurate for these reasons.This query was first introduced in v12 and at that time the
ReplicationTrackerwas always enabled in the local examples using the polling method, where the manual testing was done. In v17 we changed the vttablet flags in the local examples in order to switch from the polling based method to the heartbeat based method before subsequently removing the heartbeats as well and after that we instead started using on-demand heartbeats alone — so today the replication tracker is disabled entirely in the local examples.In any event, the real issue was that we didn't have adequate testing of this feature. This PR addresses the issue by:
You can see a manual test case here: #15341 (comment)
I think that this should be backported for the following reasons:
I also updated the throttler check to use
check-selfascheck?app=vtgateis not useful because:checkis only applicable on aPRIMARYtablet and we are checking non-PRIMARYtabletsvtgatedoesn't make sense asvtgatedoes not interface with the tablet throttlerRelated Issue(s)
Checklist