Skip to content

Commit 8712903

Browse files
Revert "DISTMYSQL-243 - Orchestrator uses inefficient subquery in REPLACE to …"
1 parent e513395 commit 8712903

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

go/inst/cluster_alias_dao.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,16 @@ func UpdateClusterAliases() error {
126126
left join database_instance_downtime using (hostname, port)
127127
where
128128
suggested_cluster_alias!=''
129-
and cluster_name != ''
130129
/* exclude newly demoted, downtimed masters */
131130
and ifnull(
132131
database_instance_downtime.downtime_active = 1
133132
and database_instance_downtime.end_timestamp > now()
134133
and database_instance_downtime.reason = ?
135134
, 0) = 0
136-
group by
137-
suggested_cluster_alias, cluster_name
135+
order by
136+
ifnull(last_checked <= last_seen, 0) asc,
137+
read_only desc,
138+
num_slave_hosts asc
138139
`, DowntimeLostInRecoveryMessage)
139140
return log.Errore(err)
140141
}

0 commit comments

Comments
 (0)