未验证 提交 74270ccc 编写于 作者: J Jialun 提交者: GitHub

Unify all error report to ereport in cdbutil.c:getCdbComponentInfo. (#5802)

* Unify all error report to ereport in cdbutil.c:getCdbComponentInfo.

* Change the message to lower case which is the usual PostgreSQL
style for error messages.
上级 12f96ee7
......@@ -266,7 +266,9 @@ getCdbComponentInfo(bool DNSLookupAsError)
*/
if (pRow->hostaddrs[0] == NULL &&
pRow->role == GP_SEGMENT_CONFIGURATION_ROLE_PRIMARY)
elog(DNSLookupAsError ? ERROR : LOG, "Cannot resolve network address for dbid=%d", dbid);
ereport(DNSLookupAsError ? ERROR : LOG,
(errcode(ERRCODE_CONNECTION_FAILURE),
errmsg("cannot resolve network address for dbid=%d", dbid)));
if (pRow->hostaddrs[0] != NULL)
pRow->hostip = pstrdup(pRow->hostaddrs[0]);
......
......@@ -110,7 +110,7 @@ t
-- wait until fts done the probe and this query will fail
0<: <... completed>
ERROR: Cannot resolve network address for dbid=2 (cdbutil.c:269)
ERROR: cannot resolve network address for dbid=2
-- verify a fts failover happens
select count(*) from gp_segment_configuration where status = 'd';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册