mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
fix typo (#6142)
* fix typo Signed-off-by: yefu.chen <yefu.chen@zilliz.com> * add log Signed-off-by: yefu.chen <yefu.chen@zilliz.com>
This commit is contained in:
parent
6b65529086
commit
6d7edc6015
@ -56,7 +56,7 @@ func getRootCoordAddr(sess *sessionutil.Session) (string, error) {
|
||||
ms, ok := msess[key]
|
||||
if !ok {
|
||||
log.Debug("RootCoordClient mess key not exist", zap.Any("key", key))
|
||||
return "", fmt.Errorf("number of master service is incorrect, %d", len(msess))
|
||||
return "", fmt.Errorf("number of RootCoord is incorrect, %d", len(msess))
|
||||
}
|
||||
return ms.Address, nil
|
||||
}
|
||||
|
@ -1288,6 +1288,7 @@ func TestRootCoord(t *testing.T) {
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, rsp8.Status.ErrorCode)
|
||||
time.Sleep(10 * time.Second)
|
||||
|
||||
})
|
||||
|
||||
@ -1445,7 +1446,6 @@ func TestRootCoord(t *testing.T) {
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
assert.NotEqual(t, commonpb.ErrorCode_Success, rsp8.Status.ErrorCode)
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
})
|
||||
|
||||
|
@ -101,18 +101,19 @@ func (s *Session) getServerID() (int64, error) {
|
||||
}
|
||||
|
||||
func (s *Session) checkIDExist() {
|
||||
log.Debug("Session checkIDExist Begin")
|
||||
s.etcdCli.Txn(s.ctx).If(
|
||||
clientv3.Compare(
|
||||
clientv3.Version(path.Join(s.metaRoot, DefaultServiceRoot, DefaultIDKey)),
|
||||
"=",
|
||||
0)).
|
||||
Then(clientv3.OpPut(path.Join(s.metaRoot, DefaultServiceRoot, DefaultIDKey), "1")).Commit()
|
||||
|
||||
log.Debug("Session checkIDExist End")
|
||||
}
|
||||
|
||||
func (s *Session) getServerIDWithKey(key string, retryTimes uint) (int64, error) {
|
||||
for {
|
||||
log.Debug("Session try to get servdeID")
|
||||
log.Debug("Session try to get serverID")
|
||||
getResp, err := s.etcdCli.Get(s.ctx, path.Join(s.metaRoot, DefaultServiceRoot, key))
|
||||
if err != nil {
|
||||
log.Debug("Session get etcd key error", zap.String("key", key), zap.Error(err))
|
||||
@ -143,6 +144,7 @@ func (s *Session) getServerIDWithKey(key string, retryTimes uint) (int64, error)
|
||||
log.Debug("Session Txn unsuccess", zap.String("key", key))
|
||||
continue
|
||||
}
|
||||
log.Debug("Session get serverID success")
|
||||
return valueInt, nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user