[skip ci]Add comment for Clone (#9390)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
pull/9412/head
sunby 2021-10-07 17:48:00 +08:00 committed by GitHub
parent 6c0b38eb5a
commit ad6b06ed85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -153,6 +153,7 @@ func (s *SegmentsInfo) AddSegmentBinlogs(segmentID UniqueID, field2Binlogs map[U
}
}
// Clone deep clone the segment info and return a new instance
func (s *SegmentInfo) Clone(opts ...SegmentInfoOption) *SegmentInfo {
info := proto.Clone(s.SegmentInfo).(*datapb.SegmentInfo)
cloned := &SegmentInfo{