mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Fix bug for setting index state when indexnode connecting failed (#28220)
Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
2057fdce43
commit
fd68837f84
@ -360,12 +360,12 @@ func (ib *indexBuilder) getTaskState(buildID, nodeID UniqueID) indexTaskState {
|
||||
if err != nil {
|
||||
log.Ctx(ib.ctx).Warn("IndexCoord get jobs info from IndexNode fail", zap.Int64("nodeID", nodeID),
|
||||
zap.Error(err))
|
||||
return indexTaskInProgress
|
||||
return indexTaskRetry
|
||||
}
|
||||
if response.GetStatus().GetErrorCode() != commonpb.ErrorCode_Success {
|
||||
log.Ctx(ib.ctx).Warn("IndexCoord get jobs info from IndexNode fail", zap.Int64("nodeID", nodeID),
|
||||
zap.Int64("buildID", buildID), zap.String("fail reason", response.GetStatus().GetReason()))
|
||||
return indexTaskInProgress
|
||||
return indexTaskRetry
|
||||
}
|
||||
|
||||
// indexInfos length is always one.
|
||||
|
||||
@ -930,7 +930,7 @@ func TestIndexBuilder_Error(t *testing.T) {
|
||||
|
||||
state, ok := ib.tasks[buildID]
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, indexTaskInProgress, state)
|
||||
assert.Equal(t, indexTaskRetry, state)
|
||||
})
|
||||
|
||||
t.Run("get state fail", func(t *testing.T) {
|
||||
@ -955,7 +955,7 @@ func TestIndexBuilder_Error(t *testing.T) {
|
||||
|
||||
state, ok := ib.tasks[buildID]
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, indexTaskInProgress, state)
|
||||
assert.Equal(t, indexTaskRetry, state)
|
||||
})
|
||||
|
||||
t.Run("finish task fail", func(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user