ape: Initialize and use policy contract interface #871
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#871
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:feature/851-use_policy_contract"
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?
Replace inmemory policy contract implementation by initialized policy contract interface.
Close #851
@ -2,6 +2,8 @@ module git.frostfs.info/TrueCloudLab/frostfs-node
go 1.20
replace git.frostfs.info/TrueCloudLab/policy-engine v0.0.0-20231211080303-8c673ee4f4af => git.frostfs.info/aarifullin/policy-engine v0.0.0-20231212185618-def903261503
Waits for ape #32
e10d2bdaba
tof7ee4846d3
@ -98,14 +98,15 @@ func initApp(ctx context.Context, c *cfg) {
fatalOnErr(c.cfgObject.cfgLocalStorage.localStorage.Init(ctx))
})
initAndLog(c, "gRPC", initGRPC)
Why this change?
initNetmapService
->initMorphComponents
->c.cfgMorph.client = cli
And then use it for
initAccessPolicyEngine(ctx, c)
->Oh, it is ape initialization below, storage engine is still before services, ok.
@ -541,1 +541,4 @@
}
func (c *Client) GetActor() *actor.Actor {
return c.rpcActor
How thread-safe is it?
I have add rwMutext locking before getting
c.rpcActor
.You're right: this is not sensitive during initialization but can lead to UB if
GetActor()
is used in other casesf7ee4846d3
to6e6eb92d17