Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions go/vt/vtorc/logic/topology_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,17 @@ func executeCheckAndRecoverFunction(analysisEntry *inst.ReplicationAnalysis) (er
recoveriesCounter.Add(recoveryName, 1)
if err != nil {
message := fmt.Sprintf("Recovery failed on %s for problem %s. Error: %s", analysisEntry.AnalyzedInstanceHostname, analysisEntry.Analysis, err.Error())
vtopsExec.SendSlackMessage(message, vtopsSlackChannel)
if analysisEntry.IsPrimary {

Choose a reason for hiding this comment

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

IsPrimary is an attribute of the vtorc analysis (i.e. diagnostic of the problem), not of the vtorc instance itself. So with this change, the recovery messages would only be used for primary vttablets, bout would still be sent by all vtorcs. Unlike classical Orchestrator, in vtorc there are no cluster leaders/primaries, they all operate independently of each other.

vtopsExec.SendSlackMessage(message, vtopsSlackChannel)
}
logger.Errorf(message)
recoveriesFailureCounter.Add(recoveryName, 1)
} else {
message := fmt.Sprintf("Recovery succeeded on %s for problem %s.", analysisEntry.AnalyzedInstanceHostname, analysisEntry.Analysis)
logger.Info(message)
vtopsExec.SendSlackMessage(message, vtopsSlackChannel)
if analysisEntry.IsPrimary {
vtopsExec.SendSlackMessage(message, vtopsSlackChannel)
}
recoveriesSuccessfulCounter.Add(recoveryName, 1)
}
if topologyRecovery == nil {
Expand Down
Loading