Revert "Fix fake segment is never handled (#20935)" (#20945)

This reverts commit 8f449f2996.

Signed-off-by: yah01 <yang.cen@zilliz.com>

Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
yah01 2022-12-02 11:41:16 +08:00 committed by GitHub
parent ec3aef1f3e
commit 482986cdf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,10 +169,7 @@ func (kc *Catalog) AlterSegment(ctx context.Context, newSegment *datapb.SegmentI
maps.Copy(kvs, segmentKvs)
if newSegment.State == commonpb.SegmentState_Flushed && oldSegment.State != commonpb.SegmentState_Flushed {
flushSegKey := buildFlushedSegmentPath(newSegment.GetCollectionID(), newSegment.GetPartitionID(), newSegment.GetID())
newSeg := &datapb.SegmentInfo{
ID: newSegment.GetID(),
IsFake: newSegment.GetNumOfRows() == 0,
}
newSeg := &datapb.SegmentInfo{ID: newSegment.GetID()}
segBytes, err := marshalSegmentInfo(newSeg)
if err != nil {
return err