Fix bulkload segment can not be flushed (#21919)

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
pull/21935/head
Xiaofan 2023-02-02 13:11:51 +08:00 committed by GitHub
parent e9f99081e4
commit 2213ed7bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -185,7 +185,6 @@ const flushInterval = 2 * time.Second
func flushPolicyV1(segment *SegmentInfo, t Timestamp) bool {
return segment.GetState() == commonpb.SegmentState_Sealed &&
segment.GetLastExpireTime() <= t &&
time.Since(segment.lastFlushTime) >= flushInterval &&
segment.currRows != 0
(segment.GetLastExpireTime() <= t && segment.currRows != 0 || (segment.IsImporting))
}

View File

@ -731,7 +731,6 @@ func (m *importManager) getTaskState(tID int64) *milvuspb.GetImportStateResponse
},
Infos: make([]*commonpb.KeyValuePair, 0),
}
log.Debug("getting import task state", zap.Int64("task ID", tID))
// (1) Search in pending tasks list.
found := false
m.pendingLock.Lock()
@ -771,6 +770,7 @@ func (m *importManager) getTaskState(tID int64) *milvuspb.GetImportStateResponse
zap.Error(err))
}
if found {
log.Info("getting import task state", zap.Int64("task ID", tID), zap.Any("state", resp.State), zap.Int64s("segment", resp.SegmentIds))
return resp
}
log.Debug("get import task state failed", zap.Int64("taskID", tID))