Skip to content

Commit

Permalink
fix: Do compressBinlog to fix logID 0
Browse files Browse the repository at this point in the history
Signed-off-by: bigsheeper <[email protected]>
  • Loading branch information
bigsheeper committed Jun 21, 2024
1 parent 061a00c commit 13825b3
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions internal/metastore/kv/datacoord/kv_catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,29 +219,26 @@ func (kc *Catalog) applyBinlogInfo(segments []*datapb.SegmentInfo, insertLogs, d
for _, segmentInfo := range segments {
if len(segmentInfo.Binlogs) == 0 {
segmentInfo.Binlogs = insertLogs[segmentInfo.ID]
} else {
err = binlog.CompressFieldBinlogs(segmentInfo.Binlogs)
if err != nil {
return err
}
}
err = binlog.CompressFieldBinlogs(segmentInfo.Binlogs)
if err != nil {
return err
}

if len(segmentInfo.Deltalogs) == 0 {
segmentInfo.Deltalogs = deltaLogs[segmentInfo.ID]
} else {
err = binlog.CompressFieldBinlogs(segmentInfo.Deltalogs)
if err != nil {
return err
}
}
err = binlog.CompressFieldBinlogs(segmentInfo.Deltalogs)
if err != nil {
return err
}

if len(segmentInfo.Statslogs) == 0 {
segmentInfo.Statslogs = statsLogs[segmentInfo.ID]
} else {
err = binlog.CompressFieldBinlogs(segmentInfo.Statslogs)
if err != nil {
return err
}
}
err = binlog.CompressFieldBinlogs(segmentInfo.Statslogs)
if err != nil {
return err
}
}
return nil
Expand Down

0 comments on commit 13825b3

Please sign in to comment.