Fix panic while flushing dropped/compacted segment (#27927)

Signed-off-by: yah01 <yah2er0ne@outlook.com>
pull/27929/head
yah01 2023-10-25 22:10:13 +08:00 committed by GitHub
parent 8ab01e5a14
commit f79c7370f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ func (s *Segment) setReleased(b bool) {
}
func (s *Segment) isValid() bool {
return s.getType() != datapb.SegmentType_Compacted
return s != nil && s.getType() != datapb.SegmentType_Compacted
}
func (s *Segment) notFlushed() bool {