policer: Simplify processRepNodes() checks #1605
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1605
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-node:refactor-policer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hopefully, it is easier to read now.
Current flow is hard to reason about, #1601 is a notorious example of
accidental complexity.
#1601.
Signed-off-by: Evgenii Stratonikov e.stratonikov@yadro.com
5447d3f4e9
to87e7122aa7
87e7122aa7
to9e2182e1a2
@ -138,0 +139,4 @@
case nodeHoldsObject:
shortage--
case nodeDoesNotHoldObject:
if !cached {
While we're here, is it possible to get rid of this nested
if
? For example, I can't understand what this condition means.Why is it that when we receive the error "object not found" from a node (
st == nodeDoesNotHoldObject
), and we have not previously requested information on this node (false == cached
), we do not remove the node from the list of nodes?I don't like it too, have already tried get rid of this
if
.Will try again harder, stay tuned.
@dstepanov-yadro I have updated the code, please take a look.
policer: Simplify processRepNodes() checksto WIP: policer: Simplify processRepNodes() checks9e2182e1a2
to98e7033123
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
WIP: policer: Simplify processRepNodes() checksto policer: Simplify processRepNodes() checkspolicer: Simplify processRepNodes() checksto WIP: policer: Simplify processRepNodes() checksWIP: policer: Simplify processRepNodes() checksto policer: Simplify processRepNodes() checksd24cbb0b1d
to94ed520eba
94ed520eba
to106446f12d
106446f12d
to3d953d7185