fix: empty growing segment cannot be recovered by streamingnode (#41666)

issue: #41665

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-05-08 14:50:53 +08:00 committed by GitHub
parent 39e7ad33d7
commit 7dca7ef4d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,9 @@ func (h *ServerHandler) GetDataVChanPositions(channel RWChannel, partitionID Uni
)
for _, s := range segments {
if (partitionID > allPartitionID && s.PartitionID != partitionID) ||
(s.GetStartPosition() == nil && s.GetDmlPosition() == nil) {
(s.GetState() != commonpb.SegmentState_Growing && s.GetStartPosition() == nil && s.GetDmlPosition() == nil) {
// empty growing segment don't have dml position and start position
// and it should be recovered for streamingnode, so we add the state-filter here.
continue
}
if s.GetIsImporting() {