forked from TrueCloudLab/frostfs-node
[#647] objsvc/search: Remove netmap.Source wrapper
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
c9e3c9956e
commit
ba58144de1
4 changed files with 6 additions and 17 deletions
|
@ -74,7 +74,7 @@ func (exec *execCtx) initEpoch() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
e, err := exec.svc.currentEpochReceiver.currentEpoch()
|
||||
e, err := exec.svc.currentEpochReceiver.Epoch()
|
||||
|
||||
switch {
|
||||
default:
|
||||
|
|
|
@ -56,7 +56,7 @@ type simpleIDWriter struct {
|
|||
|
||||
type testEpochReceiver uint64
|
||||
|
||||
func (e testEpochReceiver) currentEpoch() (uint64, error) {
|
||||
func (e testEpochReceiver) Epoch() (uint64, error) {
|
||||
return uint64(e), nil
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ type cfg struct {
|
|||
}
|
||||
|
||||
currentEpochReceiver interface {
|
||||
currentEpoch() (uint64, error)
|
||||
Epoch() (uint64, error)
|
||||
}
|
||||
|
||||
keyStore *util.KeyStorage
|
||||
|
@ -71,11 +71,9 @@ func New(e *engine.StorageEngine,
|
|||
localStorage: &storageEngineWrapper{
|
||||
storage: e,
|
||||
},
|
||||
traverserGenerator: (*traverseGeneratorWrapper)(tg),
|
||||
currentEpochReceiver: &nmSrcWrapper{
|
||||
nmSrc: ns,
|
||||
},
|
||||
keyStore: ks,
|
||||
traverserGenerator: (*traverseGeneratorWrapper)(tg),
|
||||
currentEpochReceiver: ns,
|
||||
keyStore: ks,
|
||||
}
|
||||
|
||||
for i := range opts {
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"sync"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/client"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/netmap"
|
||||
"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"
|
||||
|
@ -36,10 +35,6 @@ type storageEngineWrapper struct {
|
|||
|
||||
type traverseGeneratorWrapper util.TraverserGenerator
|
||||
|
||||
type nmSrcWrapper struct {
|
||||
nmSrc netmap.Source
|
||||
}
|
||||
|
||||
func newUniqueAddressWriter(w IDListWriter) IDListWriter {
|
||||
return &uniqueIDWriter{
|
||||
written: make(map[oid.ID]struct{}),
|
||||
|
@ -143,7 +138,3 @@ func idsFromAddresses(addrs []oid.Address) []oid.ID {
|
|||
func (e *traverseGeneratorWrapper) generateTraverser(cnr cid.ID, epoch uint64) (*placement.Traverser, error) {
|
||||
return (*util.TraverserGenerator)(e).GenerateTraverser(cnr, nil, epoch)
|
||||
}
|
||||
|
||||
func (n *nmSrcWrapper) currentEpoch() (uint64, error) {
|
||||
return n.nmSrc.Epoch()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue