[#350] object/acl: Make best effort to classify request

Classifier looks at list of inner ring nodes and container
nodes from current and previous epoch to classify request.
Sometimes these checks might return error.

Consider there is a request from unknown key and container's
placement policy valid for current epoch and invalid for past
epoch. Classifier tries to find if key belongs to container
node from current epoch -- it is not. Then it tries to find if
key belongs to container node from past epoch and it throws
error, because placement policy is invalid for past epoch.

This is a legit case and classifier should ignore such errors
to provide best effort in matching. The only error classifier
should return is an error when request does not contain
public key to classify it.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-01-27 11:47:40 +03:00 committed by Alex Vanin
parent 6e8f5b9d63
commit e252f93dbf
2 changed files with 13 additions and 3 deletions

View file

@ -287,6 +287,7 @@ func initObjectService(c *cfg) {
acl.New(
acl.WithSenderClassifier(
acl.NewSenderClassifier(
c.log,
c.cfgNetmap.wrapper,
c.cfgNetmap.wrapper,
),