WIP: Blobtree substorage #645

Closed
dstepanov-yadro wants to merge 11 commits from dstepanov-yadro/frostfs-node:feat/small_blob_store into master
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 2f6d4a49dc - Show all commits

View file

@ -21,6 +21,8 @@ const (
sizeOfDataLength = 8
sizeOfContainerID = sha256.Size
sizeOfObjectID = sha256.Size
dataExtension = ".data"
)
var (
@ -187,5 +189,5 @@ func (b *BlobTree) estimateSize(records []objectData) uint64 {
}
func (b *BlobTree) getFilePath(dir string, idx uint64) string {
return filepath.Join(dir, strconv.FormatUint(idx, 16))
return filepath.Join(dir, strconv.FormatUint(idx, 16)+dataExtension)
}

View file

@ -78,7 +78,7 @@ func (b *BlobTree) isTempFile(name string) bool {
}
func (b *BlobTree) parseIdx(name string) (uint64, error) {
return strconv.ParseUint(name, 16, 64)
return strconv.ParseUint(strings.TrimSuffix(name, dataExtension), 16, 64)
}
func (b *BlobTree) Close() error {