From 69e132e05b8b5a94eb1504b82e4042d6aaf6dd07 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Tue, 12 Mar 2024 10:13:03 +0800 Subject: [PATCH] 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 --- internal/datacoord/import_scheduler.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/datacoord/import_scheduler.go b/internal/datacoord/import_scheduler.go index bb2f3503ff2e8..08f7d17b16358 100644 --- a/internal/datacoord/import_scheduler.go +++ b/internal/datacoord/import_scheduler.go @@ -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 {