Ambiguous chain listing in policy contract #67
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-contract#67
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Policy contract provides a method to list chains: ListChains.
The listing is performed by a given prefix, not whole name.
First, chains for
<namespace>*
are listed, then they're listed for<container>*
. That means if we invoke the method with empty strings, we get all chains stored in the storage.At the same time, this leads to ambiguous situation when we mean the empty namespace is root. Thus, intending to get root namespace chains, we will get all chains. Moreover, chains themselves do not refer to which target they are belonged -> we cannot determine does a chain is recieved for root namespace or other one.
Need to discuss possible solutions, before solving the issue.
The problem is no longer relevant after #71.
ListChainsByPrefix('n', "", "")
: if value of the second param is""
, then it stands for root namespace only, because""
is mapped to a number . So, the invocation lists all chains within root namespaceListChainsByPrefix('c', "", "")
: this is barely may be use-case, because container ID cannot be empty