forked from TrueCloudLab/frostfs-node
[#496] node: Fix linter importas
Standardize the alias of the import frostfs-sdk-go/object as objectSDK. Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
4bbe9cc936
commit
033eaf77e1
80 changed files with 444 additions and 443 deletions
|
@ -13,7 +13,7 @@ import (
|
|||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/metaerr"
|
||||
meta "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
"github.com/mr-tron/base58"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util/slice"
|
||||
|
@ -129,7 +129,7 @@ func (c *cache) flushSmallObjects() {
|
|||
|
||||
var count int
|
||||
for i := range m {
|
||||
obj := object.New()
|
||||
obj := objectSDK.New()
|
||||
if err := obj.Unmarshal(m[i].data); err != nil {
|
||||
continue
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ func (c *cache) flushFSTree(ctx context.Context, ignoreErrors bool) error {
|
|||
return err
|
||||
}
|
||||
|
||||
var obj object.Object
|
||||
var obj objectSDK.Object
|
||||
err = obj.Unmarshal(data)
|
||||
if err != nil {
|
||||
c.reportFlushError("can't unmarshal an object", sAddr, metaerr.Wrap(err))
|
||||
|
@ -231,7 +231,7 @@ func (c *cache) flushFSTree(ctx context.Context, ignoreErrors bool) error {
|
|||
func (c *cache) workerFlushSmall() {
|
||||
defer c.wg.Done()
|
||||
|
||||
var obj *object.Object
|
||||
var obj *objectSDK.Object
|
||||
for {
|
||||
// Give priority to direct put.
|
||||
select {
|
||||
|
@ -251,7 +251,7 @@ func (c *cache) workerFlushSmall() {
|
|||
}
|
||||
|
||||
// flushObject is used to write object directly to the main storage.
|
||||
func (c *cache) flushObject(ctx context.Context, obj *object.Object, data []byte, st StorageType) error {
|
||||
func (c *cache) flushObject(ctx context.Context, obj *objectSDK.Object, data []byte, st StorageType) error {
|
||||
var err error
|
||||
|
||||
defer func() {
|
||||
|
@ -322,7 +322,7 @@ func (c *cache) flush(ctx context.Context, ignoreErrors bool) error {
|
|||
return err
|
||||
}
|
||||
|
||||
var obj object.Object
|
||||
var obj objectSDK.Object
|
||||
if err := obj.Unmarshal(data); err != nil {
|
||||
c.reportFlushError("can't unmarshal an object from the DB", sa, metaerr.Wrap(err))
|
||||
if ignoreErrors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue