diff --git a/go/inst/instance_dao.go b/go/inst/instance_dao.go index 3c8115568..e224156a6 100644 --- a/go/inst/instance_dao.go +++ b/go/inst/instance_dao.go @@ -1089,7 +1089,7 @@ func readInstanceRow(m sqlutils.RowMap) *Instance { instance.Problems = append(instance.Problems, "not_recently_checked") } else if instance.ReplicationThreadsExist() && !instance.ReplicaRunning() { instance.Problems = append(instance.Problems, "not_replicating") - } else if instance.SlaveLagSeconds.Valid && instance.SlaveLagSeconds.Int64 > int64(config.Config.ReasonableReplicationLagSeconds) { + } else if instance.SlaveLagSeconds.Valid && math.AbsInt64(instance.SlaveLagSeconds.Int64-int64(instance.SQLDelay)) > int64(config.Config.ReasonableReplicationLagSeconds) { instance.Problems = append(instance.Problems, "replication_lag") } if instance.GtidErrant != "" { diff --git a/go/logic/topology_recovery.go b/go/logic/topology_recovery.go index 11e191c2f..583518685 100644 --- a/go/logic/topology_recovery.go +++ b/go/logic/topology_recovery.go @@ -1604,8 +1604,8 @@ func CheckAndRecover(specificInstance *inst.InstanceKey, candidateInstanceKey *i skipProcesses = true } // intentionally iterating entries in random order - for i := range rand.Perm(len(replicationAnalysis)) { - analysisEntry := replicationAnalysis[i] + for _, j := range rand.Perm(len(replicationAnalysis)) { + analysisEntry := replicationAnalysis[j] if specificInstance != nil { // We are looking for a specific instance; if this is not the one, skip! if !specificInstance.Equals(&analysisEntry.AnalyzedInstanceKey) { diff --git a/resources/public/js/cluster.js b/resources/public/js/cluster.js index 5468c1614..84bec6dde 100644 --- a/resources/public/js/cluster.js +++ b/resources/public/js/cluster.js @@ -1386,11 +1386,7 @@ function Cluster() { content = '
' + content } wrappedContent = '
' + content + '
'; - if (tag === "analysis") { - $("#cluster_info").append(wrappedContent) - } else { - $("#cluster_info").append(wrappedContent) - } + $("#cluster_info").append(wrappedContent) } function populateSidebar(clusterInfo) {