mirror of https://github.com/milvus-io/milvus.git
Fix VDC-510 (#17554)
Signed-off-by: sunby <bingyi.sun@zilliz.com> Co-authored-by: sunby <bingyi.sun@zilliz.com>pull/17570/head
parent
76523b313b
commit
d4fdfab818
|
@ -811,26 +811,25 @@ func (m *meta) CompleteMergeCompaction(compactionLogs []*datapb.CompactionSegmen
|
|||
compactionFrom = append(compactionFrom, s.GetID())
|
||||
}
|
||||
|
||||
segment := &SegmentInfo{
|
||||
SegmentInfo: &datapb.SegmentInfo{
|
||||
ID: result.GetSegmentID(),
|
||||
CollectionID: segments[0].CollectionID,
|
||||
PartitionID: segments[0].PartitionID,
|
||||
InsertChannel: segments[0].InsertChannel,
|
||||
NumOfRows: result.NumOfRows,
|
||||
State: commonpb.SegmentState_Flushing,
|
||||
MaxRowNum: segments[0].MaxRowNum,
|
||||
Binlogs: result.GetInsertLogs(),
|
||||
Statslogs: result.GetField2StatslogPaths(),
|
||||
Deltalogs: deltalogs,
|
||||
StartPosition: startPosition,
|
||||
DmlPosition: dmlPosition,
|
||||
CreatedByCompaction: true,
|
||||
CompactionFrom: compactionFrom,
|
||||
},
|
||||
isCompacting: false,
|
||||
segmentInfo := &datapb.SegmentInfo{
|
||||
ID: result.GetSegmentID(),
|
||||
CollectionID: segments[0].CollectionID,
|
||||
PartitionID: segments[0].PartitionID,
|
||||
InsertChannel: segments[0].InsertChannel,
|
||||
NumOfRows: result.NumOfRows,
|
||||
State: commonpb.SegmentState_Flushing,
|
||||
MaxRowNum: segments[0].MaxRowNum,
|
||||
Binlogs: result.GetInsertLogs(),
|
||||
Statslogs: result.GetField2StatslogPaths(),
|
||||
Deltalogs: deltalogs,
|
||||
StartPosition: startPosition,
|
||||
DmlPosition: dmlPosition,
|
||||
CreatedByCompaction: true,
|
||||
CompactionFrom: compactionFrom,
|
||||
}
|
||||
|
||||
segment := NewSegmentInfo(segmentInfo)
|
||||
|
||||
data := make(map[string]string)
|
||||
|
||||
for _, s := range segments {
|
||||
|
|
|
@ -459,6 +459,7 @@ func Test_meta_CompleteMergeCompaction(t *testing.T) {
|
|||
assert.EqualValues(t, tt.args.result.GetInsertLogs(), segment.GetBinlogs())
|
||||
assert.EqualValues(t, tt.args.result.GetField2StatslogPaths(), segment.GetStatslogs())
|
||||
assert.EqualValues(t, tt.args.result.GetDeltalogs(), segment.GetDeltalogs())
|
||||
assert.NotZero(t, segment.lastFlushTime)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue