mirror of https://github.com/milvus-io/milvus.git
Fix fake segment is never handled (#20935)
Signed-off-by: yah01 <yang.cen@zilliz.com> Signed-off-by: yah01 <yang.cen@zilliz.com>pull/20914/head
parent
b238f4ee58
commit
8f449f2996
|
@ -169,7 +169,10 @@ func (kc *Catalog) AlterSegment(ctx context.Context, newSegment *datapb.SegmentI
|
||||||
maps.Copy(kvs, segmentKvs)
|
maps.Copy(kvs, segmentKvs)
|
||||||
if newSegment.State == commonpb.SegmentState_Flushed && oldSegment.State != commonpb.SegmentState_Flushed {
|
if newSegment.State == commonpb.SegmentState_Flushed && oldSegment.State != commonpb.SegmentState_Flushed {
|
||||||
flushSegKey := buildFlushedSegmentPath(newSegment.GetCollectionID(), newSegment.GetPartitionID(), newSegment.GetID())
|
flushSegKey := buildFlushedSegmentPath(newSegment.GetCollectionID(), newSegment.GetPartitionID(), newSegment.GetID())
|
||||||
newSeg := &datapb.SegmentInfo{ID: newSegment.GetID()}
|
newSeg := &datapb.SegmentInfo{
|
||||||
|
ID: newSegment.GetID(),
|
||||||
|
IsFake: newSegment.GetNumOfRows() == 0,
|
||||||
|
}
|
||||||
segBytes, err := marshalSegmentInfo(newSeg)
|
segBytes, err := marshalSegmentInfo(newSeg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue