[#1143] blobovnicza: Copy object data in Get
Data returned from `*bbolt.Bucket.Get()` is only valid for the lifetime of the transaction. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
6472a170eb
commit
aa0cc1f824
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package blobovnicza
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/util/slice"
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
|
||||
"go.etcd.io/bbolt"
|
||||
|
@ -51,6 +52,7 @@ func (b *Blobovnicza) Get(prm *GetPrm) (*GetRes, error) {
|
|||
zap.String("binary size", stringifyByteSize(uint64(len(data)))),
|
||||
zap.String("range", stringifyBounds(lower, upper)),
|
||||
)
|
||||
data = slice.Copy(data)
|
||||
}
|
||||
|
||||
return stop, nil
|
||||
|
|
Loading…
Reference in a new issue