[#222] Put small objects in blobovnicza in blobStor

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-01 16:33:29 +03:00
parent 351e4b4592
commit 862f9a3f1a

View file

@ -39,13 +39,19 @@ func (b *BlobStor) Put(prm *PutPrm) (*PutRes, error) {
data = b.compressor(data) data = b.compressor(data)
// save object in shallow dir // save object in shallow dir
return nil, b.fsTree.put(prm.obj.Address(), data) return new(PutRes), b.fsTree.put(prm.obj.Address(), data)
} else { } else {
// save object in blobovnicza // save object in blobovnicza
res, err := b.blobovniczas.put(prm.obj.Address(), b.compressor(data))
if err != nil {
return nil, err
}
// FIXME: use Blobovnicza when it becomes implemented. return &PutRes{
// Temporary save in shallow dir. roBlobovniczaID: roBlobovniczaID{
return nil, b.fsTree.put(prm.obj.Address(), b.compressor(data)) blobovniczaID: res,
},
}, nil
} }
} }