forked from TrueCloudLab/frostfs-node
[#1412] shard: Resolve container is indexed on metabase resync
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4572fa4874
commit
3da168f8cf
4 changed files with 49 additions and 2 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor"
|
||||
meta "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama"
|
||||
|
@ -95,6 +96,8 @@ type cfg struct {
|
|||
metricsWriter MetricsWriter
|
||||
|
||||
reportErrorFunc func(selfID string, message string, err error)
|
||||
|
||||
containerInfo container.InfoProvider
|
||||
}
|
||||
|
||||
func defaultCfg() *cfg {
|
||||
|
@ -358,6 +361,13 @@ func WithZeroCountCallback(cb EmptyContainersCallback) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithContainerInfoProvider returns option to set container info provider.
|
||||
func WithContainerInfoProvider(containerInfo container.InfoProvider) Option {
|
||||
return func(c *cfg) {
|
||||
c.containerInfo = containerInfo
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Shard) fillInfo() {
|
||||
s.cfg.info.MetaBaseInfo = s.metaBase.DumpInfo()
|
||||
s.cfg.info.BlobStorInfo = s.blobStor.DumpInfo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue