node: Fix Put
in multi REP with intersecting sets of nodes #560
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 milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#560
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:bugfix/traverse-via-intersecting-sets"
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?
Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
36dc79922d
todf8e86df2f
LGTM, could you also describe a scenario in the commit body?
df8e86df2f
to33a8430bb8
Updated body with policies examples.
@ -248,6 +248,7 @@ func (s *Service) saveToPlacementNodes(ctx context.Context,
for _, nodeAddress := range nodeAddresses {
nodeAddress := nodeAddress
if traversal.processed(nodeAddress) {
traverser.SubmitSuccess()
Hm, actually this is not completely true -- we submit a node as
processed
if we made a request to it, but the request could've failed, so we cannotSubmitSuccess()
unconditionally.Updated a bit, now checks is node processed successful on the previous iteration.
33a8430bb8
to46b557d471
46b557d471
to647cde3f07
647cde3f07
to748dab0d4a
@ -49,3 +53,3 @@
// container nodes which was processed during the primary object placement
mExclude map[string]struct{}
mExclude map[string]*mExcludeItem
There is no need for
mExcludeItem
structure.Agree, replaced with
*bool
.@ -84,3 +88,1 @@
func (x *traversal) processed(n placement.Node) bool {
_, ok := x.mExclude[string(n.PublicKey())]
return ok
func (x *traversal) processed(n placement.Node) (*mExcludeItem, bool) {
Maybe return a pointer and compare it with nil instead of a second argument?
Removed
processed
completely.@ -217,1 +223,3 @@
if t.traversal.processed(addrs[i]) {
if val, ok := t.traversal.processed(addrs[i]); ok {
// Check is node processed successful on the previous iteration.
if val != nil && val.res {
val
can never be nil by construction -- we never put nil in map.Agree, replaced with your suggestion.
748dab0d4a
todb327ecdd3
db327ecdd3
toe8b484bcef
Put
handling #226