Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: txthrottler to poll replication lag on PRIMARY only #16243

Open
timvaillancourt opened this issue Jun 20, 2024 · 0 comments
Open
Assignees
Labels
Component: Throttler Component: VTTablet Needs Triage This issue needs to be correctly labelled and triaged Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Feature Request

Comments

@timvaillancourt
Copy link
Contributor

timvaillancourt commented Jun 20, 2024

Feature Description

Today a tablet with --enable-tx-throttler set will open healthcheck streams to other shard-tablets (in order to monitor replication lag) on every tablet, regardless of the tablet type 馃槵

This is inefficient because only the PRIMARY tablet receives writes that the throttler could reject with throttler errors

This issue requests that the txthrottler opens healthcheck streams only on PRIMARY tablets by adding a .MakePrimary(bool) method (similar to other tabletserver components) under *stateManager.servePrimary. All setup/shutdown of healthcheck streams will move under .MakePrimary(bool) and on demotion time the streams can be shut down using .MakePrimary(false) under *stateManager.unservePrimary

A potential consequence of this change is a delay in a newly-promoted PRIMARY receiving replication lag state from all replicas, equal to --healthcheck_interval, whereas today a newly-promoted PRIMARY would already have replication lag state. I feel this is an acceptable tradeoff that can be documented.

Use Case(s)

Users of txthrottler, ie: --enable-tx-throttler on vttablet

@timvaillancourt timvaillancourt added Type: Feature Request Type: Enhancement Logical improvement (somewhere between a bug and feature) Needs Triage This issue needs to be correctly labelled and triaged Component: Throttler Component: VTTablet labels Jun 20, 2024
@timvaillancourt timvaillancourt self-assigned this Jun 20, 2024
@timvaillancourt timvaillancourt changed the title Feature Request: txthrottler to monitor replication lag on PRIMARY only Feature Request: txthrottler to poll replication lag on PRIMARY only Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Throttler Component: VTTablet Needs Triage This issue needs to be correctly labelled and triaged Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant