fix: segment may never get flushed if sealed before watch (#29436)

See also #29092

`FlushSegments` transfer only `Growing` segment to flushing, if the
segment is in `Sealed` state before Datanode watch channel, the state
will never got satisfied for a segment be selected to be flushed.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/29403/head
congqixia 2023-12-23 21:32:43 +08:00 committed by GitHub
parent 1b7f1d7067
commit a937e4c232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,8 @@ func (c *metaCacheImpl) init(vchannel *datapb.VchannelInfo, factory PkStatsFacto
}
for _, seg := range vchannel.UnflushedSegments {
// segment state could be sealed for growing segment if flush request processed before datanode watch
seg.State = commonpb.SegmentState_Growing
c.segmentInfos[seg.GetID()] = NewSegmentInfo(seg, factory(seg))
}
}