Skip to content

Commit 0a8e89e

Browse files
Fix a couple of logs in VTOrc (#13667)
1 parent 364209f commit 0a8e89e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

go/vt/vtorc/inst/instance_dao.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,9 @@ func ForgetLongUnseenInstances() error {
11181118
log.Error(err)
11191119
return err
11201120
}
1121-
_ = AuditOperation("forget-unseen", "", fmt.Sprintf("Forgotten instances: %d", rows))
1121+
if rows > 0 {
1122+
_ = AuditOperation("forget-unseen", "", fmt.Sprintf("Forgotten instances: %d", rows))
1123+
}
11221124
return err
11231125
}
11241126

go/vt/vtorc/logic/topology_recovery.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ func getCheckAndRecoverFunctionCode(analysisCode inst.AnalysisCode, tabletAlias
388388
case inst.DeadPrimary, inst.DeadPrimaryAndSomeReplicas:
389389
// If ERS is disabled, we have no way of repairing the cluster.
390390
if !config.ERSEnabled() {
391+
log.Infof("VTOrc not configured to run ERS, skipping recovering %v", analysisCode)
391392
return noRecoveryFunc
392393
}
393394
if isInEmergencyOperationGracefulPeriod(tabletAlias) {
@@ -397,6 +398,7 @@ func getCheckAndRecoverFunctionCode(analysisCode inst.AnalysisCode, tabletAlias
397398
case inst.PrimaryTabletDeleted:
398399
// If ERS is disabled, we have no way of repairing the cluster.
399400
if !config.ERSEnabled() {
401+
log.Infof("VTOrc not configured to run ERS, skipping recovering %v", analysisCode)
400402
return noRecoveryFunc
401403
}
402404
if isInEmergencyOperationGracefulPeriod(tabletAlias) {

0 commit comments

Comments
 (0)