mirror of https://github.com/milvus-io/milvus.git
fix: etcd session discoverer cannot recover from ErrCompacted (#36568)
issue: #36554 Signed-off-by: chyezh <chyezh@outlook.com>pull/36523/head
parent
ffc12fb5c4
commit
bd7910632a
|
@ -95,6 +95,7 @@ func (sw *sessionDiscoverer) watch(ctx context.Context, cb func(VersionedState)
|
|||
// handleETCDEvent handles the etcd event.
|
||||
func (sw *sessionDiscoverer) handleETCDEvent(resp clientv3.WatchResponse) error {
|
||||
if resp.Err() != nil {
|
||||
sw.logger.Warn("etcd watch failed with error", zap.Error(resp.Err()))
|
||||
return resp.Err()
|
||||
}
|
||||
|
||||
|
@ -123,10 +124,6 @@ func (sw *sessionDiscoverer) handleETCDEvent(resp clientv3.WatchResponse) error
|
|||
|
||||
// initDiscover initializes the discoverer if needed.
|
||||
func (sw *sessionDiscoverer) initDiscover(ctx context.Context) error {
|
||||
if sw.revision > 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
resp, err := sw.etcdCli.Get(ctx, sw.prefix, clientv3.WithPrefix(), clientv3.WithSerializable())
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue