-
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
TxThrottler: dont throttle unless lag #14789
TxThrottler: dont throttle unless lag #14789
Conversation
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
|
7979573
to
231c2f6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14789 +/- ##
=======================================
Coverage ? 39.75%
=======================================
Files ? 1639
Lines ? 380078
Branches ? 0
=======================================
Hits ? 151084
Misses ? 212777
Partials ? 16217 ☔ View full report in Codecov by Sentry. |
276a9f8
to
3c2acbb
Compare
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
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.
One more comment that needs to be addressed and then we can merge this. Thank you for your patience with the prolonged review process on this PR.
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
It feels like this should have been backported to |
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com>
…pt. 3 + ci fixes (#351) * txthrottler: add metrics for topoWatcher and healthCheckStreamer (vitessio#13153) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Replace deprecated `github.com/golang/mock` with `go.uber.org/mock` (vitessio#13512) Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Per workload TxThrottler metrics (vitessio#13526) Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * tx throttler: healthcheck all cells if `--tx-throttler-healthcheck-cells` is undefined (vitessio#12477) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Add dry-run/monitoring-only mode for TxThrottler (vitessio#13604) Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com> * `txthrottler`: remove `txThrottlerConfig` struct, rely on `tabletenv` (vitessio#13624) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * tx throttler: remove unused topology watchers (vitessio#14412) Signed-off-by: deepthi <deepthi@planetscale.com> * tx_throttler: delete topo watcher metric instead of deprecating (vitessio#14445) Signed-off-by: deepthi <deepthi@planetscale.com> * TxThrottler: dont throttle unless lag (vitessio#14789) Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> * go test -v Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * add mutex to flaky parseFlags() Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * revert tweaks for flaky tests Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix protojson err Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * make vtadmin_web_proto_types Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * remove debug t.Logf(...) Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Signed-off-by: Eng Zer Jun <engzerjun@gmail.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Signed-off-by: Eduardo J. Ortega U. <5791035+ejortegau@users.noreply.github.com> Signed-off-by: deepthi <deepthi@planetscale.com> Co-authored-by: Eng Zer Jun <engzerjun@gmail.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Eduardo J. Ortega U <5791035+ejortegau@users.noreply.github.com> Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com>
Description
This PR addresses issue #14768. It does so by ensuring that the transaction throttler checks for current lag in the shard before deciding whether to throttle the request or not.
The issue mentioned above is a bug causing artificially high throttling when the
TxThrottler
is enabled. Backporting of this is desirable as it will correct that undesirable behaviour in previous versions, not only in the next one. However, it seems I cannot add the backport to label to the PR.Related Issue(s)
#14768
Checklist
Deployment Notes
N/A