forked from TrueCloudLab/frostfs-node
[#1446] services/tree: Cache connections to the container nodes
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
4437cd7113
commit
b04f712773
4 changed files with 69 additions and 18 deletions
|
@ -70,7 +70,7 @@ func (s *Service) replicate(ctx context.Context, op movePair) error {
|
|||
n.IterateNetworkEndpoints(func(addr string) bool {
|
||||
lastAddr = addr
|
||||
|
||||
c, err := dialTreeService(ctx, addr)
|
||||
c, err := s.cache.get(ctx, addr)
|
||||
if err != nil {
|
||||
lastErr = err
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue