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())
|
compactionFrom = append(compactionFrom, s.GetID())
|
||||||
}
|
}
|
||||||
|
|
||||||
segment := &SegmentInfo{
|
segmentInfo := &datapb.SegmentInfo{
|
||||||
SegmentInfo: &datapb.SegmentInfo{
|
ID: result.GetSegmentID(),
|
||||||
ID: result.GetSegmentID(),
|
CollectionID: segments[0].CollectionID,
|
||||||
CollectionID: segments[0].CollectionID,
|
PartitionID: segments[0].PartitionID,
|
||||||
PartitionID: segments[0].PartitionID,
|
InsertChannel: segments[0].InsertChannel,
|
||||||
InsertChannel: segments[0].InsertChannel,
|
NumOfRows: result.NumOfRows,
|
||||||
NumOfRows: result.NumOfRows,
|
State: commonpb.SegmentState_Flushing,
|
||||||
State: commonpb.SegmentState_Flushing,
|
MaxRowNum: segments[0].MaxRowNum,
|
||||||
MaxRowNum: segments[0].MaxRowNum,
|
Binlogs: result.GetInsertLogs(),
|
||||||
Binlogs: result.GetInsertLogs(),
|
Statslogs: result.GetField2StatslogPaths(),
|
||||||
Statslogs: result.GetField2StatslogPaths(),
|
Deltalogs: deltalogs,
|
||||||
Deltalogs: deltalogs,
|
StartPosition: startPosition,
|
||||||
StartPosition: startPosition,
|
DmlPosition: dmlPosition,
|
||||||
DmlPosition: dmlPosition,
|
CreatedByCompaction: true,
|
||||||
CreatedByCompaction: true,
|
CompactionFrom: compactionFrom,
|
||||||
CompactionFrom: compactionFrom,
|
|
||||||
},
|
|
||||||
isCompacting: false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
segment := NewSegmentInfo(segmentInfo)
|
||||||
|
|
||||||
data := make(map[string]string)
|
data := make(map[string]string)
|
||||||
|
|
||||||
for _, s := range segments {
|
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.GetInsertLogs(), segment.GetBinlogs())
|
||||||
assert.EqualValues(t, tt.args.result.GetField2StatslogPaths(), segment.GetStatslogs())
|
assert.EqualValues(t, tt.args.result.GetField2StatslogPaths(), segment.GetStatslogs())
|
||||||
assert.EqualValues(t, tt.args.result.GetDeltalogs(), segment.GetDeltalogs())
|
assert.EqualValues(t, tt.args.result.GetDeltalogs(), segment.GetDeltalogs())
|
||||||
|
assert.NotZero(t, segment.lastFlushTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue