Skip to content

vreplication: improved lag tracking#4637

Merged
sougou merged 2 commits intovitessio:masterfrom
planetscale:ss-vheart
Mar 3, 2019
Merged

vreplication: improved lag tracking#4637
sougou merged 2 commits intovitessio:masterfrom
planetscale:ss-vheart

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Feb 17, 2019

The new lag tracking introduces the following changes:

  • VStreamer sends its current time along with every event. This
    allows for VPlayer to correct for any clock skew that may
    exist between the two machines. This results in a more accurate
    calculation of lag.
  • If there are no events to send for a period of time, VStreamer
    sends a heartbeat event. This allows us VPlayer to essentially
    know for sure that it's still caught up.
  • If VPlayer receives no event for its wait period, then it updates
    the SecondsBehindMaster stat to indicate that it's actually falling
    behind.

The VStreamer timeout for heartbeat is set slightly lower than the
VPlayer idle timeout. This ensures that Vplayer won't timeout
exactly when it's about to receive the heartbeat event.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

@sougou sougou requested a review from rafael February 17, 2019 20:13
The new lag tracking introduces the following changes:
* VStreamer sends its current time along with every event. This
  allows for VPlayer to correct for any clock skew that may
  exist between the two machines. This results in a more accurate
  calculation of lag.
* If there are no events to send for a period of time, VStreamer
  sends a heartbeat event. This allows us VPlayer to essentially
  know for sure that it's still caught up.
* If VPlayer receives no event for its wait period, then it updates
  the SecondsBehindMaster stat to indicate that it's actually falling
  behind.

The VStreamer timeout for heartbeat is set slightly lower than the
VPlayer idle timeout. This ensures that Vplayer won't timeout
exactly when it's about to receive the heartbeat event.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@rafael
Copy link
Copy Markdown
Member

rafael commented Mar 3, 2019

@sougou and I talked about this PR in Slack. I suggested we add some comments to make some parts clearer to future readers. This was addressed. LGTM.

@sougou
Copy link
Copy Markdown
Contributor Author

sougou commented Mar 3, 2019

Failure doesn't look related to PR (vtctld_web has flaked a few times before). Going to override and merge.

@sougou sougou merged commit 31178f9 into vitessio:master Mar 3, 2019
@sougou sougou deleted the ss-vheart branch March 6, 2019 05:52
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.

2 participants