mirror of https://github.com/milvus-io/milvus.git
Split large Etcd operations while altering segment info (#20278)
/kind bug issue: #20275 Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com> Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>pull/20284/head
parent
94aafb50c9
commit
9751bec04c
|
@ -113,7 +113,14 @@ func (kc *Catalog) AlterSegments(ctx context.Context, newSegments []*datapb.Segm
|
|||
maps.Copy(kvs, segmentKvs)
|
||||
}
|
||||
|
||||
return kc.Txn.MultiSave(kvs)
|
||||
saveFn := func(partialKvs map[string]string) error {
|
||||
return kc.Txn.MultiSave(partialKvs)
|
||||
}
|
||||
if err := etcd.SaveByBatch(kvs, saveFn); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (kc *Catalog) AlterSegment(ctx context.Context, newSegment *datapb.SegmentInfo, oldSegment *datapb.SegmentInfo) error {
|
||||
|
|
Loading…
Reference in New Issue