From e5fe46124b4b02a152ec863be9d3a7a5e3d64b3e Mon Sep 17 00:00:00 2001 From: congqixia Date: Wed, 13 Jul 2022 10:08:28 +0800 Subject: [PATCH] Fix isCompacting flag lost after segment clone (#18248) Signed-off-by: Congqi Xia --- internal/datacoord/segment_info.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/datacoord/segment_info.go b/internal/datacoord/segment_info.go index 70f40798c..0b9f516dd 100644 --- a/internal/datacoord/segment_info.go +++ b/internal/datacoord/segment_info.go @@ -191,6 +191,8 @@ func (s *SegmentInfo) Clone(opts ...SegmentInfoOption) *SegmentInfo { currRows: s.currRows, allocations: s.allocations, lastFlushTime: s.lastFlushTime, + isCompacting: s.isCompacting, + //cannot copy size, since binlog may be changed } for _, opt := range opts { opt(cloned) @@ -205,6 +207,8 @@ func (s *SegmentInfo) ShadowClone(opts ...SegmentInfoOption) *SegmentInfo { currRows: s.currRows, allocations: s.allocations, lastFlushTime: s.lastFlushTime, + isCompacting: s.isCompacting, + size: s.size, } for _, opt := range opts { -- GitLab