Fix maintenance node processing in policer #1604

Merged
fyrchik merged 5 commits from fyrchik/frostfs-node:fix-policer into master 2025-01-17 08:50:09 +00:00

5 commits

Author SHA1 Message Date
57efa0bc8e
[#1604] policer: Properly handle maintenance nodes
All checks were successful
DCO action / DCO (pull_request) Successful in 41s
Vulncheck / Vulncheck (pull_request) Successful in 57s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m42s
Build / Build Components (pull_request) Successful in 1m48s
Tests and linters / gopls check (pull_request) Successful in 2m15s
Tests and linters / Lint (pull_request) Successful in 2m50s
Tests and linters / Staticcheck (pull_request) Successful in 3m2s
Tests and linters / Run gofumpt (pull_request) Successful in 3m4s
Tests and linters / Tests with -race (pull_request) Successful in 3m36s
Tests and linters / Tests (pull_request) Successful in 4m6s
Tests and linters / Run gofumpt (push) Successful in 29s
Vulncheck / Vulncheck (push) Successful in 51s
Pre-commit hooks / Pre-commit (push) Successful in 1m26s
Build / Build Components (push) Successful in 2m14s
Tests and linters / Staticcheck (push) Successful in 2m20s
Tests and linters / Lint (push) Successful in 3m17s
Tests and linters / Tests (push) Successful in 3m47s
OCI image / Build container images (push) Successful in 4m28s
Tests and linters / gopls check (push) Successful in 4m44s
Tests and linters / Tests with -race (push) Successful in 4m49s
Consider `REP 1 REP 1` placement (selects/filters are omitted).
The placement is `[1, 2], [1, 0]`. We are the 0-th node.
Node 1 is under maintenance, so we do not replicate object
on the node 2. In the second replication group node 1 is under maintenance,
but current caching logic considers it as "replica holder" and removes
local copy. Voilà, we have DL if the object is missing from the node 1.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-16 16:37:52 +03:00
26e0c82fb8
[#1604] policer/test: Add test for MAINTENANCE runtime status
The node can have MAINTENANCE status in the network map, but can also be
ONLINE while responding with MAINTENANCE. These are 2 different code
paths, let's test them separately.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-16 16:37:16 +03:00
4538ccb12a
[#1604] policer: Do not process the same node twice
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-16 16:37:16 +03:00
84e1599997
[#1604] policer: Remove one-line helpers
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-16 16:37:16 +03:00
5a270e2e61
[#1604] policer: Use status instead of bool value in node cache
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-16 16:37:16 +03:00