Skip to content

Error switching standby and primary metrics #814

@0xgouda

Description

@0xgouda

Describe the bug
in the Reap() method the hostLastknownStatusInRecover[monitoredSource.Name] has been set to monitoredSource.IsInRecovery before the comparsion so it will always be false and the metrics configs won't be switched

### set to same value here
hostLastKnownStatusInRecovery[monitoredSource.Name] = monitoredSource.IsInRecovery
....
if monitoredSource.IsPostgresSource() {
    ....
    lastKnownStatusInRecovery := hostLastKnownStatusInRecovery[monitoredSource.Name]
    ... 
    ### always false we are comparing the variable to itself
    else if lastKnownStatusInRecovery != monitoredSource.IsInRecovery { 
                  ....
    }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions