Skip to content

Commit

Permalink
Use logID instead of logPath for import segment (milvus-io#31182)
Browse files Browse the repository at this point in the history
Currently, the logPath in the querycoord should be replaced with logID.
This PR updates the import segment's logPath to logID.

issue: milvus-io#31123,
milvus-io#28885

Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper authored Mar 12, 2024
1 parent 06df9b8 commit 69e132e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/datacoord/import_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 69e132e

Please sign in to comment.