diff --git a/engine/factory/factory.go b/engine/factory/factory.go index af6c253a5..c3f028c9c 100644 --- a/engine/factory/factory.go +++ b/engine/factory/factory.go @@ -33,7 +33,7 @@ var ( ) func getEngineCacheKey(endpoint, ca, cert, key string) string { - return endpoint + utils.SHA256(fmt.Sprintf(":%v:%v:%v", ca, cert, key))[:8] + return endpoint + "-" + utils.SHA256(fmt.Sprintf(":%v:%v:%v", ca, cert, key))[:8] } // EngineCacheChecker checks if the engine in cache is available diff --git a/store/etcdv3/node.go b/store/etcdv3/node.go index 315276e14..267f7939c 100644 --- a/store/etcdv3/node.go +++ b/store/etcdv3/node.go @@ -322,12 +322,10 @@ func (m *Mercury) doGetNodes(ctx context.Context, kvs []*mvccpb.KeyValue, labels } nodeChan <- node - if node.Available { - if client, err := m.makeClient(ctx, node); err != nil { - log.Errorf(ctx, "[doGetNodes] failed to make client for %v, err: %v", node.Name, err) - } else { - node.Engine = client - } + if client, err := m.makeClient(ctx, node); err != nil { + log.Errorf(ctx, "[doGetNodes] failed to make client for %v, err: %v", node.Name, err) + } else { + node.Engine = client } }) } diff --git a/store/redis/node.go b/store/redis/node.go index ed629f305..19ab2fffc 100644 --- a/store/redis/node.go +++ b/store/redis/node.go @@ -312,12 +312,10 @@ func (r *Rediaron) doGetNodes(ctx context.Context, kvs map[string]string, labels } nodeChan <- node - if node.Available { - if client, err := r.makeClient(ctx, node); err != nil { - log.Errorf(ctx, "[doGetNodes] failed to make client for %v, err: %v", node.Name, err) - } else { - node.Engine = client - } + if client, err := r.makeClient(ctx, node); err != nil { + log.Errorf(ctx, "[doGetNodes] failed to make client for %v, err: %v", node.Name, err) + } else { + node.Engine = client } }) }