Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
add log message if new tablet doesn't have a sufficiently new timesta…
Browse files Browse the repository at this point in the history
…mp to be marked up
  • Loading branch information
gentryx committed Aug 17, 2017
1 parent 44179dc commit b5339b7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions go/vt/discovery/tablet_stats_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,13 @@ func (tc *TabletStatsCache) StatsUpdate(ts *TabletStats) {

// We already have one up server, see if we
// need to replace it.
if e.healthy[0].TabletExternallyReparentedTimestamp > ts.TabletExternallyReparentedTimestamp {
// The notification we just got is older than
// the one we had before, discard it.
if ts.TabletExternallyReparentedTimestamp < e.healthy[0].TabletExternallyReparentedTimestamp {
log.Warningf("not marking healthy master as Up because its externally reparented timestamt is smaller than the highest known timestamp from previous MASTERs: %d < %d ",
ts.TabletExternallyReparentedTimestamp,
e.healthy[0].TabletExternallyReparentedTimestamp,
topoproto.KeyspaceShardString(eps.Target.Keyspace, eps.Target.Shard),
topoproto.TabletAliasString(eps.Tablet.Alias),
topoproto.TabletAliasString(e.healthy[0].Tablet.Alias))
return
}

Expand Down

0 comments on commit b5339b7

Please sign in to comment.