Enhance error message when coordinator not healthy (#15950)

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
pull/15928/head
Xiaofan 2022-03-09 15:57:58 +08:00 committed by GitHub
parent c2fe12bc97
commit d013134b44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ func (c *Client) getDataCoordAddr() (string, error) {
ms, ok := msess[key]
if !ok {
log.Debug("DataCoordClient, not existed in msess ", zap.Any("key", key), zap.Any("len of msess", len(msess)))
return "", fmt.Errorf("number of datacoord is incorrect, %d", len(msess))
return "", fmt.Errorf("find no available datacoord, check datacoord state")
}
return ms.Address, nil
}

View File

@ -98,7 +98,7 @@ func (c *Client) getIndexCoordAddr() (string, error) {
ms, ok := msess[key]
if !ok {
log.Debug("IndexCoordClient msess key not existed", zap.Any("key", key), zap.Any("len of msess", len(msess)))
return "", fmt.Errorf("number of indexcoord is incorrect, %d", len(msess))
return "", fmt.Errorf("find no available indexcoord, check indexcoord state")
}
return ms.Address, nil
}

View File

@ -81,7 +81,7 @@ func (c *Client) getQueryCoordAddr() (string, error) {
ms, ok := msess[key]
if !ok {
log.Debug("QueryCoordClient msess key not existed", zap.Any("key", key))
return "", fmt.Errorf("number of querycoord is incorrect, %d", len(msess))
return "", fmt.Errorf("find no available querycoord, check querycoord state")
}
return ms.Address, nil
}

View File

@ -91,7 +91,7 @@ func (c *Client) getRootCoordAddr() (string, error) {
ms, ok := msess[key]
if !ok {
log.Warn("RootCoordClient mess key not exist", zap.Any("key", key))
return "", fmt.Errorf("number of RootCoord is incorrect, %d", len(msess))
return "", fmt.Errorf("find no available rootcoord, check rootcoord state")
}
log.Debug("RootCoordClient GetSessions success", zap.String("address", ms.Address))
return ms.Address, nil