Skip to content

Commit 6705943

Browse files
committed
Revert "Add debug logging for MySQL version-aware reparent logic"
This reverts commit 4bfe9c5.
1 parent 11c2913 commit 6705943

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

go/vt/vtctl/reparentutil/emergency_reparenter.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ func (erp *EmergencyReparenter) findMostAdvanced(
418418
v = unknownVersion
419419
}
420420
mysqlVersions[i] = v
421-
log.Infof("finding intermediate source - candidate %v has MySQL version %d.%d.%d", tablet.Alias, v.Major, v.Minor, v.Patch)
422421
}
423422

424423
// sort the tablets for finding the best intermediate source in ERS — position first to minimize data loss

go/vt/vtctl/reparentutil/util.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,13 @@ func ElectNewPrimary(
173173
return nil, vterrors.Errorf(vtrpc.Code_INTERNAL, "cannot find a tablet to reparent to%v", reasonsToInvalidate.String())
174174
}
175175

176-
for i, tablet := range validTablets {
177-
if i < len(mysqlVersions) {
178-
log.Infof("ElectNewPrimary: candidate %v has MySQL version %d.%d.%d", topoproto.TabletAliasString(tablet.Alias), mysqlVersions[i].Major, mysqlVersions[i].Minor, mysqlVersions[i].Patch)
179-
}
180-
}
181-
182176
// sort preferred tablets for finding the best primary — PRS prefers version over position
183177
// because it always catches the elected tablet up to the old primary's exact position.
184178
err = sortTabletsForReparent(validTablets, tabletPositions, innodbBufferPool, mysqlVersions, opts.durability, SortForPRS)
185179
if err != nil {
186180
return nil, err
187181
}
188182

189-
log.Infof("ElectNewPrimary: elected %v as new primary candidate", topoproto.TabletAliasString(validTablets[0].Alias))
190183
return validTablets[0].Alias, nil
191184
}
192185

@@ -438,16 +431,11 @@ func findCandidate(
438431
if sourceVersion.IsSameRelease(bestVersion) {
439432
for _, candidate := range possibleCandidates {
440433
if topoproto.TabletAliasEqual(intermediateSource.Alias, candidate.Alias) {
441-
log.Infof("findCandidate: preferring intermediate source %v (version %d.%d) over lowest-version candidate %v (version %d.%d) — same release",
442-
topoproto.TabletAliasString(candidate.Alias), sourceVersion.Major, sourceVersion.Minor,
443-
topoproto.TabletAliasString(best.Alias), bestVersion.Major, bestVersion.Minor)
444434
return candidate
445435
}
446436
}
447437
}
448438

449-
log.Infof("findCandidate: selected %v with lowest MySQL version %d.%d",
450-
topoproto.TabletAliasString(best.Alias), bestVersion.Major, bestVersion.Minor)
451439
return best
452440
}
453441

0 commit comments

Comments
 (0)