Skip to content
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

Only Run SendSlackMessage From Primary VTorc Instances #597

Open
wants to merge 3 commits into
base: slack-19.0
Choose a base branch
from

Conversation

makinje16
Copy link
Member

Description

Currently VTorc sends 3x slack notifications when recovery succeeds or fails. This PR limits those messages to only be from the primary vtorc instances.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

@makinje16 makinje16 requested a review from a team as a code owner February 4, 2025 19:45
@github-actions github-actions bot added this to the v19.0.7 milestone Feb 4, 2025
@@ -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 {
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants