Fix checking EC parent existence on Put object to shard #1548

Merged
fyrchik merged 3 commits from dstepanov-yadro/frostfs-node:fix/path_removed_ec into master 2024-12-11 07:26:34 +00:00
Showing only changes of commit 5b42ea4c82 - Show all commits

View file

@ -281,6 +281,8 @@ func (p *Policer) adjustECPlacement(ctx context.Context, objInfo objectcore.Info
} }
chunkIDs[ch.Index] = ecInfoChunkID chunkIDs[ch.Index] = ecInfoChunkID
} }
} else if client.IsErrObjectAlreadyRemoved(err) {

I think I've suggested similar changes for REP policy handling (#1543), but #1543 (comment) was said to me.

@fyrchik Could you please comment?

I think I've suggested similar changes for `REP` policy handling (https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1543), but https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1543#issuecomment-60284 was said to me. @fyrchik Could you please comment?

ok, fixed

ok, fixed

What exactly was fixed? Is seems you still introduce a new behaviour:
image

What exactly was fixed? Is seems you still introduce a new behaviour: ![image](/attachments/14b33afa-e25f-4fc4-b3b8-5f1deb352215)

Sorry, the behaviour is the same, why have this commit at all?

Sorry, the behaviour is the same, why have this commit at all?

Technically this commit relates to policer, but others relate to engine.
If the actual question is why this change, then this change if required to not to perform PUT request as we know, that object already removed and PUT request will fail anyway.

Technically this commit relates to policer, but others relate to engine. If the actual question is why this change, then this change if required to not to perform PUT request as we know, that object already removed and PUT request will fail anyway.
restore = false
} else if !p.cfg.netmapKeys.IsLocalKey(n.PublicKey()) && uint32(idx) < objInfo.ECInfo.Total { } else if !p.cfg.netmapKeys.IsLocalKey(n.PublicKey()) && uint32(idx) < objInfo.ECInfo.Total {
p.log.Warn(ctx, logs.PolicerCouldNotGetObjectFromNodeMoving, zap.String("node", hex.EncodeToString(n.PublicKey())), zap.Stringer("object", parentAddress), zap.Error(err)) p.log.Warn(ctx, logs.PolicerCouldNotGetObjectFromNodeMoving, zap.String("node", hex.EncodeToString(n.PublicKey())), zap.Stringer("object", parentAddress), zap.Error(err))
p.replicator.HandleReplicationTask(ctx, replicator.Task{ p.replicator.HandleReplicationTask(ctx, replicator.Task{