Fix VDC-510 (#17554)

Signed-off-by: sunby <bingyi.sun@zilliz.com>

Co-authored-by: sunby <bingyi.sun@zilliz.com>
pull/17570/head
Bingyi Sun 2022-06-15 19:58:10 +08:00 committed by GitHub
parent 76523b313b
commit d4fdfab818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 18 deletions

View File

@ -811,8 +811,7 @@ func (m *meta) CompleteMergeCompaction(compactionLogs []*datapb.CompactionSegmen
compactionFrom = append(compactionFrom, s.GetID())
}
segment := &SegmentInfo{
SegmentInfo: &datapb.SegmentInfo{
segmentInfo := &datapb.SegmentInfo{
ID: result.GetSegmentID(),
CollectionID: segments[0].CollectionID,
PartitionID: segments[0].PartitionID,
@ -827,10 +826,10 @@ func (m *meta) CompleteMergeCompaction(compactionLogs []*datapb.CompactionSegmen
DmlPosition: dmlPosition,
CreatedByCompaction: true,
CompactionFrom: compactionFrom,
},
isCompacting: false,
}
segment := NewSegmentInfo(segmentInfo)
data := make(map[string]string)
for _, s := range segments {

View File

@ -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)
}
}
})