mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
Remove unused segment
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
4e8604c1bc
commit
dfb68a7e46
@ -540,11 +540,13 @@ func (colReplica *collectionReplica) replaceGrowingSegmentBySealedSegment(segmen
|
||||
colReplica.mu.Lock()
|
||||
defer colReplica.mu.Unlock()
|
||||
if segment.segmentType != segmentTypeSealed && segment.segmentType != segmentTypeIndexing {
|
||||
deleteSegment(segment)
|
||||
return errors.New("unexpected segment type")
|
||||
}
|
||||
targetSegment, err := colReplica.getSegmentByIDPrivate(segment.ID())
|
||||
if err == nil && targetSegment != nil {
|
||||
if targetSegment.segmentType != segmentTypeGrowing {
|
||||
deleteSegment(segment)
|
||||
// target segment has been a sealed segment
|
||||
return nil
|
||||
}
|
||||
|
@ -350,6 +350,10 @@ func (s *Segment) segmentInsert(offset int64, entityIDs *[]UniqueID, timestamps
|
||||
int sizeof_per_row,
|
||||
signed long int count);
|
||||
*/
|
||||
if s.segmentType != segmentTypeGrowing || s.enableLoadBinLog {
|
||||
return nil
|
||||
}
|
||||
|
||||
if s.segmentPtr == nil {
|
||||
return errors.New("null seg core pointer")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user