forked from TrueCloudLab/frostfs-node
[#2210] pilorama: Allocate bucket name outside of batches
1. Reduce allocations inside transactions. 2. Do not encode container ID to string: it allocates a lot and takes more space. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
165a600624
commit
25d5995cef
2 changed files with 18 additions and 9 deletions
|
@ -34,8 +34,9 @@ func (b *batch) run() {
|
|||
sort.Slice(b.operations, func(i, j int) bool {
|
||||
return b.operations[i].Time < b.operations[j].Time
|
||||
})
|
||||
fullID := bucketName(b.cid, b.treeID)
|
||||
err := b.forest.db.Update(func(tx *bbolt.Tx) error {
|
||||
bLog, bTree, err := b.forest.getTreeBuckets(tx, b.cid, b.treeID)
|
||||
bLog, bTree, err := b.forest.getTreeBuckets(tx, fullID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue