forked from TrueCloudLab/frostfs-node
[#253] metabase: Add prefix to Graveyard and ToMoveIt bucket names
In previous implementation DB.Containers method could return an error about invalid container ID string format. This could happen if some of top-level buckets had name w/o "_" substring. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
df3d30d1ec
commit
edef9463d7
3 changed files with 47 additions and 12 deletions
|
@ -39,7 +39,7 @@ func (db *DB) containers(tx *bbolt.Tx) ([]*container.ID, error) {
|
|||
func parseContainerID(name []byte) (*container.ID, error) {
|
||||
strName := string(name)
|
||||
|
||||
if strings.Contains(strName, "_") {
|
||||
if strings.Contains(strName, invalidBase58String) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue