Skip to content

tm: add more logging to checkMastership#6618

Merged
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ss-tm2-more-logs
Aug 26, 2020
Merged

tm: add more logging to checkMastership#6618
deepthi merged 2 commits intovitessio:masterfrom
planetscale:ss-tm2-more-logs

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Aug 25, 2020

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

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested review from deepthi and enisoc August 25, 2020 02:28
})
case err == nil:
if oldTablet.Type == topodatapb.TabletType_MASTER {
log.Infof("Shard master alias matches, and existing tablet agrees. Switching to master with tablet's master term start time: %v", oldTablet.MasterTermStartTime)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also log if oldTablet.Type was not MASTER? That means the shard record and tablet record disagree, which seems like an important case to call out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. In this case, would it be safe to make ourselves master and match the shard record's timestamp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added handling for a couple of more corner cases. LMK what you think.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@deepthi deepthi merged commit 8917adf into vitessio:master Aug 26, 2020
@sougou sougou deleted the ss-tm2-more-logs branch August 26, 2020 02:13
@deepthi deepthi added this to the v7.0.2 milestone Sep 9, 2020
@deepthi deepthi removed this from the v7.0.2 milestone Sep 9, 2020
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.

3 participants