object: Skip APE check for certain request roles #1039
No reviewers
TrueCloudLab/storage-core-developers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1039
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:fix/check_ape_role"
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?
@ -63,0 +67,4 @@
return nil
case nativeschema.PropertyValueContainerRoleIR:
switch prm.Method {
case nativeschema.MethodPutObject, nativeschema.MethodDeleteObject:
I would rather make
return nil
on explicit enumeration of read methods: this way we won't accidentally allow writing something when new method is added.Sure. Fixed
@ -60,6 +61,20 @@ func (c *checkerImpl) CheckAPE(ctx context.Context, prm Prm) error {
return fmt.Errorf("failed to create ape request: %w", err)
}
// APE check is ignored for some inter-node requests.
Can we do this check before
newAPERequest
call? It seems we do not use the result.Moved this checks at the top. Also, I replaced checking
prm.Role
by if-else statements insteadswitch
9803717515
toe593b7ecaa
e593b7ecaa
to6e3b36be38
6e3b36be38
to5c252c9193
Please, check it on dev-env, should be ok to PUT some objects and see no errors in logs.
I checked. Also, I created a container with 4 nodes and was checking how is object policer dealing the replication - it's OK, no errors