forked from TrueCloudLab/frostfs-node
[#211] blobstor: Refactor GetBig parameters and result
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
fb6857a1cb
commit
6813f40665
3 changed files with 44 additions and 23 deletions
|
@ -77,10 +77,12 @@ func (s *Shard) Get(prm *GetPrm) (*GetRes, error) {
|
|||
if prm.ln < 0 {
|
||||
// try to read from WriteCache
|
||||
// TODO: implement
|
||||
res, err := s.blobStor.GetBig(
|
||||
new(blobstor.GetBigPrm).
|
||||
WithAddress(prm.addr),
|
||||
)
|
||||
|
||||
// form GetBig parameters
|
||||
getBigPrm := new(blobstor.GetBigPrm)
|
||||
getBigPrm.SetAddress(prm.addr)
|
||||
|
||||
res, err := s.blobStor.GetBig(getBigPrm)
|
||||
if err != nil {
|
||||
if errors.Is(err, blobstor.ErrObjectNotFound) {
|
||||
err = ErrObjectNotFound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue