forked from TrueCloudLab/frostfs-node
[#661] blobovniczatree: Use .db extension for db files
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
44552a849b
commit
484eb59893
15 changed files with 160 additions and 24 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
|
@ -54,7 +55,7 @@ func (b *Blobovniczas) Iterate(ctx context.Context, prm common.IteratePrm) (comm
|
|||
return prm.Handler(common.IterationElement{
|
||||
Address: elem.Address(),
|
||||
ObjectData: data,
|
||||
StorageID: []byte(p),
|
||||
StorageID: []byte(strings.TrimSuffix(p, dbExtension)),
|
||||
})
|
||||
}
|
||||
return nil
|
||||
|
@ -140,10 +141,16 @@ func (b *Blobovniczas) iterateSorted(ctx context.Context, addr *oid.Address, cur
|
|||
return false, ctx.Err()
|
||||
default:
|
||||
}
|
||||
|
||||
lastPart := u64ToHexString(indices[i])
|
||||
if isLeafLevel {
|
||||
lastPart = u64ToHexStringExt(indices[i])
|
||||
}
|
||||
|
||||
if i == 0 {
|
||||
curPath = append(curPath, u64ToHexString(indices[i]))
|
||||
curPath = append(curPath, lastPart)
|
||||
} else {
|
||||
curPath[len(curPath)-1] = u64ToHexString(indices[i])
|
||||
curPath[len(curPath)-1] = lastPart
|
||||
}
|
||||
|
||||
if exec {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue