mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
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>
This commit is contained in:
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
Block a user