diff --git a/pkg/services/object/search/exec.go b/pkg/services/object/search/exec.go index f471da20e..d69cb9b50 100644 --- a/pkg/services/object/search/exec.go +++ b/pkg/services/object/search/exec.go @@ -93,7 +93,7 @@ func (exec *execCtx) initEpoch() bool { } func (exec *execCtx) generateTraverser(cnr cid.ID) (*placement.Traverser, bool) { - t, err := exec.svc.traverserGenerator.generateTraverser(cnr, exec.curProcEpoch) + t, err := exec.svc.traverserGenerator.GenerateTraverser(cnr, nil, exec.curProcEpoch) switch { default: diff --git a/pkg/services/object/search/search_test.go b/pkg/services/object/search/search_test.go index d8c5ad090..9bfc54739 100644 --- a/pkg/services/object/search/search_test.go +++ b/pkg/services/object/search/search_test.go @@ -71,7 +71,7 @@ func newTestStorage() *testStorage { } } -func (g *testTraverserGenerator) generateTraverser(_ cid.ID, epoch uint64) (*placement.Traverser, error) { +func (g *testTraverserGenerator) GenerateTraverser(_ cid.ID, _ *oid.ID, epoch uint64) (*placement.Traverser, error) { return placement.NewTraverser( placement.ForContainer(g.c), placement.UseBuilder(g.b[epoch]), diff --git a/pkg/services/object/search/service.go b/pkg/services/object/search/service.go index fd3dbb07b..863312200 100644 --- a/pkg/services/object/search/service.go +++ b/pkg/services/object/search/service.go @@ -45,7 +45,7 @@ type cfg struct { } traverserGenerator interface { - generateTraverser(cid.ID, uint64) (*placement.Traverser, error) + GenerateTraverser(cid.ID, *oid.ID, uint64) (*placement.Traverser, error) } currentEpochReceiver interface { @@ -71,7 +71,7 @@ func New(e *engine.StorageEngine, localStorage: &storageEngineWrapper{ storage: e, }, - traverserGenerator: (*traverseGeneratorWrapper)(tg), + traverserGenerator: tg, currentEpochReceiver: ns, keyStore: ks, } diff --git a/pkg/services/object/search/util.go b/pkg/services/object/search/util.go index 6ea8e3f14..37d215256 100644 --- a/pkg/services/object/search/util.go +++ b/pkg/services/object/search/util.go @@ -8,8 +8,6 @@ import ( "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine" internalclient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/internal/client" "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util" - "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object_manager/placement" - cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id" oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id" ) @@ -33,8 +31,6 @@ type storageEngineWrapper struct { storage *engine.StorageEngine } -type traverseGeneratorWrapper util.TraverserGenerator - func newUniqueAddressWriter(w IDListWriter) IDListWriter { return &uniqueIDWriter{ written: make(map[oid.ID]struct{}), @@ -134,7 +130,3 @@ func idsFromAddresses(addrs []oid.Address) []oid.ID { return ids } - -func (e *traverseGeneratorWrapper) generateTraverser(cnr cid.ID, epoch uint64) (*placement.Traverser, error) { - return (*util.TraverserGenerator)(e).GenerateTraverser(cnr, nil, epoch) -}