WIP: Store hashed entity name in policy contract #87
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
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-contract#87
Loading…
Reference in a new issue
No description provided.
Delete branch "alexvanin/frostfs-contract:after-ug"
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?
@ -105,6 +108,9 @@ func storageKey(prefix Kind, counter int, name []byte) []byte {
}
func mapKey(kind Kind, name []byte) []byte {
if len(name) > 0 {
Why do we need this check, can it be false?
Yes,
ListTargets
usesmapKey
with empty name to iterate all storage keys based on kind prefix.We've decided to avoid this change for
v0.19.X
releases.I see an issue with proposed approach:
ListTargets
method becomes useless. It returns hashedsha256(entityName)
, and this info cannot be reused later. So I see couple of options:ListTargets
and all use-cases with this method (are there any?)entityKind
andentityName
as a value in contract, so it can be returned inListTargets
Option 2 looks ok to me
So we have mappings:
We can iterate over the first to get a list.
Frankly, I would remove
ListTargets
unless it is really needed.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.