forked from TrueCloudLab/frostfs-node
[#959] shard: Skip rebuild in DEGRADED
mode
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
5cbf57081f
commit
2429508ac5
1 changed files with 8 additions and 5 deletions
|
@ -173,8 +173,9 @@ func (s *Shard) Init(ctx context.Context) error {
|
||||||
s.gc.init(ctx)
|
s.gc.init(ctx)
|
||||||
|
|
||||||
s.rb = newRebuilder(s.rebuildLimiter)
|
s.rb = newRebuilder(s.rebuildLimiter)
|
||||||
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
|
if !m.NoMetabase() {
|
||||||
|
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,9 +328,11 @@ func (s *Shard) Reload(ctx context.Context, opts ...Option) error {
|
||||||
defer unlock()
|
defer unlock()
|
||||||
|
|
||||||
s.rb.Stop(s.log)
|
s.rb.Stop(s.log)
|
||||||
defer func() {
|
if !s.info.Mode.NoMetabase() {
|
||||||
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
|
defer func() {
|
||||||
}()
|
s.rb.Start(ctx, s.blobStor, s.metaBase, s.log)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
ok, err := s.metaBase.Reload(c.metaOpts...)
|
ok, err := s.metaBase.Reload(c.metaOpts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue