forked from TrueCloudLab/frostfs-node
[#1437] node: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6921a89061
commit
7429553266
209 changed files with 1068 additions and 1036 deletions
|
@ -388,7 +388,7 @@ func (s *Service) syncLoop(ctx context.Context) {
|
|||
break
|
||||
}
|
||||
|
||||
newMap, cnrsToSync := s.containersToSync(cnrs)
|
||||
newMap, cnrsToSync := s.containersToSync(ctx, cnrs)
|
||||
|
||||
s.syncContainers(ctx, cnrsToSync)
|
||||
|
||||
|
@ -475,14 +475,14 @@ func (s *Service) removeContainers(ctx context.Context, newContainers map[cid.ID
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Service) containersToSync(cnrs []cid.ID) (map[cid.ID]struct{}, []cid.ID) {
|
||||
func (s *Service) containersToSync(ctx context.Context, cnrs []cid.ID) (map[cid.ID]struct{}, []cid.ID) {
|
||||
newMap := make(map[cid.ID]struct{}, len(s.cnrMap))
|
||||
cnrsToSync := make([]cid.ID, 0, len(cnrs))
|
||||
|
||||
for _, cnr := range cnrs {
|
||||
_, pos, err := s.getContainerNodes(cnr)
|
||||
if err != nil {
|
||||
s.log.Error(context.Background(), logs.TreeCouldNotCalculateContainerNodes,
|
||||
s.log.Error(ctx, logs.TreeCouldNotCalculateContainerNodes,
|
||||
zap.Stringer("cid", cnr),
|
||||
zap.Error(err))
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue