-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
tm: add more logging to checkMastership #6618
Conversation
Signed-off-by: Sugu Sougoumarane <[email protected]>
@@ -468,6 +469,7 @@ func (tm *TabletManager) checkMastership(ctx context.Context, si *topo.ShardInfo | |||
}) | |||
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 <[email protected]>
Signed-off-by: Sugu Sougoumarane [email protected]