[#1613] morph: Add tracing for morph queries to neo-go

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2025-02-05 16:37:11 +03:00
parent 4de5fca547
commit 9b113c3156
Signed by: achuprov
GPG key ID: 2D916FFD803B0EDD
120 changed files with 623 additions and 562 deletions

View file

@ -157,7 +157,7 @@ func (s *Server) replicateObject(ctx context.Context, addr oid.Address, obj *obj
return false, nil
}
nodes, err := s.getContainerNodes(cid)
nodes, err := s.getContainerNodes(ctx, cid)
if err != nil {
return false, err
}
@ -182,7 +182,7 @@ func (s *Server) replicateObject(ctx context.Context, addr oid.Address, obj *obj
}
func (s *Server) replicateTree(ctx context.Context, contID cid.ID, treeID string, forest pilorama.Forest) (bool, string, error) {
nodes, err := s.getContainerNodes(contID)
nodes, err := s.getContainerNodes(ctx, contID)
if err != nil {
return false, "", err
}
@ -240,13 +240,13 @@ func (s *Server) replicateTreeToNode(ctx context.Context, forest pilorama.Forest
}
}
func (s *Server) getContainerNodes(contID cid.ID) ([]netmap.NodeInfo, error) {
nm, err := s.netMapSrc.GetNetMap(0)
func (s *Server) getContainerNodes(ctx context.Context, contID cid.ID) ([]netmap.NodeInfo, error) {
nm, err := s.netMapSrc.GetNetMap(ctx, 0)
if err != nil {
return nil, err
}
c, err := s.cnrSrc.Get(contID)
c, err := s.cnrSrc.Get(ctx, contID)
if err != nil {
return nil, err
}