Use 100 as the default priority; 0 or less means node will never be promoted

This commit is contained in:
Ian Barwick
2015-03-26 10:38:20 +09:00
parent 15a531fed8
commit 3e621f43d1
7 changed files with 38 additions and 20 deletions

View File

@@ -1065,7 +1065,8 @@ do_master_failover(void)
" FROM %s.repl_nodes "
" WHERE cluster = '%s' "
" AND active IS TRUE "
" ORDER BY priority, id "
" AND priority > 0 "
" ORDER BY priority DESC, id "
" LIMIT %i ",
get_repmgr_schema_quoted(my_local_conn),
local_options.cluster_name,