Reading replication lag via _changelog_ table, also on control replicas #347

Merged
merged 8 commits into from Jan 4, 2017

Projects

None yet

2 participants

@shlomi-noach
Collaborator

Storyline: #346

This PR removes the use of --replication-lag-query and uniformly reads replication lag via changelog table, base on gh-ost's internal heartbeat mechanism -- also on the throttle control replicas.

@shlomi-noach
Collaborator
@shlomi-noach shlomi-noach deployed to production/ghost-mysql001 Dec 30, 2016 Active
@shlomi-noach shlomi-noach deployed to production/github-mysqlutil Jan 1, 2017 Active
@shlomi-noach shlomi-noach requested a review from jonahberquist Jan 1, 2017
@jonahberquist

Nice work! I like that this will allow folks to use subsecond replication delay throttling without having to have a third-party subsecond heartbeat mechanism.

I noticed a missing is in one of the docs file changes, but I'm hitting approve here anyway 👍

doc/subsecond-lag.md
You can explicitly define how frequently will `gh-ost` inject heartbeat events, via `heartbeat-interval-millis`. You should set `heartbeat-interval-millis <= max-lag-millis`. It still works if not, but loses granularity and effect.
-On the `throttle-control-replicas`, `gh-ost` only issues SQL queries, and does not attempt to read the binary log stream. Perhaps those other replicas don't have binary logs in the first place.
+In earlier versions, the `--throttle-control-replicas` list was subjected to `1` second resolution or to 3rd party heartbeat injections such as `pt-heartbeat`. This is no longer the case. The argument `--replication-lag-query` has been deprecated and no longer needed.
@jonahberquist
jonahberquist Jan 4, 2017 Contributor

s/and no longer needed/and is no longer needed/

@shlomi-noach
shlomi-noach Jan 4, 2017 Collaborator

fixed!

@shlomi-noach shlomi-noach deployed to production/github-mysqlutil Jan 4, 2017 Active
@shlomi-noach shlomi-noach merged commit e17f41b into master Jan 4, 2017

1 check passed

gh-ost-build-deploy-tarball Build #5087356 succeeded in 5s
Details
@shlomi-noach shlomi-noach deleted the heartbeat-control-replicas-unified branch Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment