未验证 提交 2213ed7b 编写于 作者: X Xiaofan 提交者: GitHub

Fix bulkload segment can not be flushed (#21919)

Signed-off-by: Nxiaofan-luan <xiaofan.luan@zilliz.com>
上级 e9f99081
...@@ -185,7 +185,6 @@ const flushInterval = 2 * time.Second ...@@ -185,7 +185,6 @@ const flushInterval = 2 * time.Second
func flushPolicyV1(segment *SegmentInfo, t Timestamp) bool { func flushPolicyV1(segment *SegmentInfo, t Timestamp) bool {
return segment.GetState() == commonpb.SegmentState_Sealed && return segment.GetState() == commonpb.SegmentState_Sealed &&
segment.GetLastExpireTime() <= t &&
time.Since(segment.lastFlushTime) >= flushInterval && 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 ...@@ -731,7 +731,6 @@ func (m *importManager) getTaskState(tID int64) *milvuspb.GetImportStateResponse
}, },
Infos: make([]*commonpb.KeyValuePair, 0), Infos: make([]*commonpb.KeyValuePair, 0),
} }
log.Debug("getting import task state", zap.Int64("task ID", tID))
// (1) Search in pending tasks list. // (1) Search in pending tasks list.
found := false found := false
m.pendingLock.Lock() m.pendingLock.Lock()
...@@ -771,6 +770,7 @@ func (m *importManager) getTaskState(tID int64) *milvuspb.GetImportStateResponse ...@@ -771,6 +770,7 @@ func (m *importManager) getTaskState(tID int64) *milvuspb.GetImportStateResponse
zap.Error(err)) zap.Error(err))
} }
if found { 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 return resp
} }
log.Debug("get import task state failed", zap.Int64("taskID", tID)) log.Debug("get import task state failed", zap.Int64("taskID", tID))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册