forked from TrueCloudLab/frostfs-node
[#1362] ape: Move common APE check logic to separate package
* Tree and object service have the same log for checking APE. So, this check should be moved to common package. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
92fe5d90f5
commit
a812932984
4 changed files with 205 additions and 222 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"sync/atomic"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama"
|
||||
checkercore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/common/ape"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/acl"
|
||||
cidSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
|
@ -37,6 +38,8 @@ type Service struct {
|
|||
|
||||
initialSyncDone atomic.Bool
|
||||
|
||||
apeChecker checkercore.CheckCore
|
||||
|
||||
// cnrMap contains existing (used) container IDs.
|
||||
cnrMap map[cidSDK.ID]struct{}
|
||||
// cnrMapMtx protects cnrMap
|
||||
|
@ -72,6 +75,8 @@ func New(opts ...Option) *Service {
|
|||
s.syncChan = make(chan struct{})
|
||||
s.syncPool, _ = ants.NewPool(defaultSyncWorkerCount)
|
||||
|
||||
s.apeChecker = checkercore.New(s.localOverrideStorage, s.morphChainStorage, s.frostfsidSubjectProvider, s.state)
|
||||
|
||||
return &s
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue