neofs-node icon indicating copy to clipboard operation
neofs-node copied to clipboard

Do not log same errors in policer twice

Open fyrchik opened this issue 2 years ago • 8 comments

Do not log same errors in policer twice. Seems useless, if we cannot select any nodes from the container, it won't change during this epoch.

окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.922Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.922Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}
окт 26 10:32:18 buky neofs-node[24920]: 2022-10-26T10:32:18.923Z        error        policer/check.go:98        could not build placement vector for object        {"component": "Object Policer", "cid": "ChimApoDVi9nYhiQohTKrVhYMvNsVuTiXMcJCr4RNyt", "error": "could not get container nodes: not enough nodes to SELECT from: ''"}

fyrchik avatar Oct 27 '22 05:10 fyrchik

In fact this suggests not repeating attempts as well.

roman-khimov avatar Dec 21 '23 16:12 roman-khimov

I think with some paraphrasing it duplicates https://github.com/nspcc-dev/neofs-node/issues/2692.

carpawell avatar Dec 21 '23 17:12 carpawell

I thought this one is a bit wider in scope, but yeah, looks like they're the same. Then the older one wins.

roman-khimov avatar Dec 21 '23 19:12 roman-khimov

these are different topics to me:

  • this issue is about "if container nodes could not be built, skip the container until network map change"
  • #2692 is about calculation caching

it'd be confusing to see how #2722 changes relate to this issue's text

cthulhu-rider avatar Jan 25 '24 10:01 cthulhu-rider

According to @roman-khimov's

In fact this suggests not repeating attempts as well.

i found this issue was about caching.

carpawell avatar Jan 25 '24 15:01 carpawell

i found this issue is about caching

caching diff stuff on different app components. I dont mind, cross-ref b/w issues exists anyway

cthulhu-rider avatar Jan 25 '24 17:01 cthulhu-rider

there are following node components processing storage policies:

  • Object service (ACL and placement/search)
  • Policer
  • Used space metrics service
  • Control service
  • Tree service
  • Reputation service (?)

all components currently process storage policies independently. This makes it possible to optimize them step by step

#2722 touches Object service as the most sensitive one in terms of performance. Other services could be done after it using a proven basis

any other thoughts?

cthulhu-rider avatar Jan 25 '24 17:01 cthulhu-rider

all components currently process storage policies independently

Can we unify it?

carpawell avatar Jan 26 '24 16:01 carpawell