[#220] shard: Use new metabase implementation

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-30 17:30:32 +03:00 committed by Alex Vanin
parent d8d38d3476
commit d30454a572
2 changed files with 3 additions and 3 deletions

View file

@ -49,7 +49,7 @@ func (s *Shard) Put(prm *PutPrm) (*PutRes, error) {
} }
// put to metabase // put to metabase
if err := s.metaBase.Put(prm.obj); err != nil { if err := s.metaBase.Put(prm.obj, nil); err != nil {
// may we need to handle this case in a special way // may we need to handle this case in a special way
// since the object has been successfully written to BlobStor // since the object has been successfully written to BlobStor
return nil, errors.Wrap(err, "could not put object to metabase") return nil, errors.Wrap(err, "could not put object to metabase")

View file

@ -2,7 +2,7 @@ package shard
import ( import (
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor" "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase" meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase/v2"
"github.com/nspcc-dev/neofs-node/pkg/util/logger" "github.com/nspcc-dev/neofs-node/pkg/util/logger"
"go.uber.org/atomic" "go.uber.org/atomic"
) )
@ -47,7 +47,7 @@ func New(opts ...Option) *Shard {
cfg: c, cfg: c,
mode: atomic.NewUint32(0), // TODO: init with particular mode mode: atomic.NewUint32(0), // TODO: init with particular mode
blobStor: blobstor.New(c.blobOpts...), blobStor: blobstor.New(c.blobOpts...),
metaBase: meta.NewDB(c.metaOpts...), metaBase: meta.New(c.metaOpts...),
} }
} }