mirror of https://github.com/milvus-io/milvus.git
Fix bulkload segment can not be flushed (#21919)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>pull/21935/head
parent
e9f99081e4
commit
2213ed7bed
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue