[#1809] node: Do not boot up if metabase is outdated

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-21 23:57:46 +03:00 committed by fyrchik
parent 8b3b16fe62
commit 4eb0ed11f8
4 changed files with 14 additions and 1 deletions

View file

@ -116,6 +116,10 @@ func (s *Shard) Init() error {
for _, component := range components {
if err := component.Init(); err != nil {
if component == s.metaBase {
if errors.Is(err, meta.ErrOutdatedVersion) {
return err
}
err = s.handleMetabaseFailure("init", err)
if err != nil {
return err