Do not try to report task state when DataNode itself is down (#19647)

/kind bug

issue: #19502
Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
pull/19594/head
Ten Thousand Leaves 2022-10-10 09:45:21 +08:00 committed by GitHub
parent d64f318a80
commit b9feeab15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 8 deletions

View File

@ -982,16 +982,9 @@ func (node *DataNode) Import(ctx context.Context, req *datapb.ImportTaskRequest)
zap.Int64("taskID", req.GetImportTask().GetTaskId()),
zap.Error(errDataNodeIsUnhealthy(Params.DataNodeCfg.GetNodeID())))
msg := msgDataNodeIsUnhealthy(Params.DataNodeCfg.GetNodeID())
importResult.State = commonpb.ImportState_ImportFailed
importResult.Infos = append(importResult.Infos, &commonpb.KeyValuePair{Key: "failed_reason", Value: msg})
reportErr := reportFunc(importResult)
if reportErr != nil {
log.Warn("fail to report import state to root coord", zap.Error(reportErr))
}
return &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UnexpectedError,
Reason: msg,
Reason: msgDataNodeIsUnhealthy(Params.DataNodeCfg.GetNodeID()),
}, nil
}