forked from TrueCloudLab/frostfs-node
[#1613] morph: Add tracing for morph queries to neo-go
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
4de5fca547
commit
9b113c3156
120 changed files with 623 additions and 562 deletions
|
@ -2,6 +2,7 @@ package tree
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
@ -32,13 +33,13 @@ type containerCacheItem struct {
|
|||
const defaultContainerCacheSize = 10
|
||||
|
||||
// getContainerNodes returns nodes in the container and a position of local key in the list.
|
||||
func (s *Service) getContainerNodes(cid cidSDK.ID) ([]netmapSDK.NodeInfo, int, error) {
|
||||
nm, err := s.nmSource.GetNetMap(0)
|
||||
func (s *Service) getContainerNodes(ctx context.Context, cid cidSDK.ID) ([]netmapSDK.NodeInfo, int, error) {
|
||||
nm, err := s.nmSource.GetNetMap(ctx, 0)
|
||||
if err != nil {
|
||||
return nil, -1, fmt.Errorf("can't get netmap: %w", err)
|
||||
}
|
||||
|
||||
cnr, err := s.cnrSource.Get(cid)
|
||||
cnr, err := s.cnrSource.Get(ctx, cid)
|
||||
if err != nil {
|
||||
return nil, -1, fmt.Errorf("can't get container: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue