mirror of https://github.com/milvus-io/milvus.git
Use logID instead of logPath for import segment (#31182)
Currently, the logPath in the querycoord should be replaced with logID. This PR updates the import segment's logPath to logID. issue: https://github.com/milvus-io/milvus/issues/31123, https://github.com/milvus-io/milvus/issues/28885 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/31197/head
parent
06df9b8462
commit
69e132e05b
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/metastore/kv/binlog"
|
||||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
|
@ -288,6 +289,13 @@ func (s *importScheduler) processInProgressImport(task ImportTask) {
|
|||
}
|
||||
if resp.GetState() == datapb.ImportTaskStateV2_Completed {
|
||||
for _, info := range resp.GetImportSegmentsInfo() {
|
||||
// try to parse path and fill logID
|
||||
err = binlog.CompressFieldBinlogs(info.GetBinlogs())
|
||||
if err != nil {
|
||||
log.Warn("fail to CompressFieldBinlogs for import binlogs",
|
||||
WrapTaskLog(task, zap.Int64("segmentID", info.GetSegmentID()), zap.Error(err))...)
|
||||
return
|
||||
}
|
||||
op := ReplaceBinlogsOperator(info.GetSegmentID(), info.GetBinlogs(), info.GetStatslogs(), nil)
|
||||
err = s.meta.UpdateSegmentsInfo(op)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue