Skip to content

testing/running on replica: gets lags via SHOW SLAVE STATUS#365

Merged
shlomi-noach merged 2 commits intomasterfrom
replication-lag-check-test-on-replica
Feb 7, 2017
Merged

testing/running on replica: gets lags via SHOW SLAVE STATUS#365
shlomi-noach merged 2 commits intomasterfrom
replication-lag-check-test-on-replica

Conversation

@shlomi-noach
Copy link
Copy Markdown
Contributor

Followup on #347

on test-on-replica or migrate-on-replica, relying on the internal changelog heartbeat is incorrect behavior and leads to lags. This is because is those cases the heartbeat is injected onto the replica in the first place. So clearly as we read it it will be happy and up-to-date. But this means we're overloading the replica with our migration, causing it to lag.

With this PR, on test-on-replica or migrate-on-replica, we read SHOW SLAVE STATUS of the replica. This will have 1-second granularity but this is fine for running on replica.

@shlomi-noach
Copy link
Copy Markdown
Contributor Author

Note that it is still possible to use throttle-control-replicas on test-on-replica and migrate-on-replica, and when these are provided, we expect to read internal heartbeat. These would be descendants of the migrated replica.

@shlomi-noach shlomi-noach merged commit f5dd7fd into master Feb 7, 2017
@shlomi-noach shlomi-noach deleted the replication-lag-check-test-on-replica branch February 7, 2017 09:12
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

Successfully merging this pull request may close these issues.

1 participant