mirror of https://github.com/milvus-io/milvus.git
Fix datacoord start timeout (#28026)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>pull/28034/head
parent
2af46d7333
commit
38aa53f523
|
@ -66,8 +66,6 @@ func (kv *etcdKV) GetPath(key string) string {
|
|||
func (kv *etcdKV) WalkWithPrefix(prefix string, paginationSize int, fn func([]byte, []byte) error) error {
|
||||
start := time.Now()
|
||||
prefix = path.Join(kv.rootPath, prefix)
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), RequestTimeout)
|
||||
defer cancel()
|
||||
|
||||
batch := int64(paginationSize)
|
||||
opts := []clientv3.OpOption{
|
||||
|
@ -78,6 +76,8 @@ func (kv *etcdKV) WalkWithPrefix(prefix string, paginationSize int, fn func([]by
|
|||
|
||||
key := prefix
|
||||
for {
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), RequestTimeout)
|
||||
defer cancel()
|
||||
resp, err := kv.getEtcdMeta(ctx, key, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue