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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggest to add an parameter check-interval to control the interval of check load and slave lag. #166

Closed
rj03hou opened this issue Aug 18, 2016 · 7 comments

Comments

@rj03hou
Copy link
Contributor

rj03hou commented Aug 18, 2016

hi

suggest to add an parameter check-interval to control the interval of check load and slave lag.
I read the code and find the interval of throttler is set to 1 second, in some situation, the load and lag must check more frequently.

func (this *Migrator) initiateThrottler() error {
    throttlerTick := time.Tick(1 * time.Second)
@shlomi-noach
Copy link
Contributor

shlomi-noach commented Aug 18, 2016

pro tip #1: use three backtics for multi line comments (see how I edited your comment)

pro tip #2: you can link to a specific line in code: https://github.com/github/gh-ost/blob/master/go/logic/migrator.go#L191

This would be an easy fix. I'm curious about needing to poll replicas more frequently than once per 1sec, given that replication lag resolution in MySQL is 1sec. Can you please elaborate?

@rj03hou
Copy link
Contributor Author

rj03hou commented Aug 19, 2016

OK, thank you for your suggest.
We use mysql in some application which is very sensitive about slave lag, I have suggest the RD use master in this situation, but sometimes they forget, and they want the as small lag as possible, especially in the tools.

@shlomi-noach
Copy link
Contributor

Cool, but what's the deal of more than once per second in light of the resolution?

@rj03hou
Copy link
Contributor Author

rj03hou commented Aug 19, 2016

I don't understand very well.but seconds_behind_master is only in second, so I think 1s is enough. And check the pt-osc check-interval default value is 5s, we set to 1s when we use.

@shlomi-noach
Copy link
Contributor

I'm closing this for now. If there's a particular case for reducing polling interval, either reopen this or open a new one.

@shlomi-noach
Copy link
Contributor

I'm curious about needing to poll replicas more frequently than once per 1sec, given that replication lag resolution in MySQL is 1sec

I stand corrected, and we are able (on 5.6) to get subsecond granularity. We are good to go on polling for replication lag smaller than 1s and in shorter interval. See #203 (comment) for more on this.

We're unlikely to sample max-load more frequently.

@shlomi-noach
Copy link
Contributor

Closed as per #203 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants