[#1559] shard: Do not consult metabase in a degraded mode

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-06-29 14:27:36 +03:00 committed by fyrchik
parent 339864b720
commit c8911d72d0
17 changed files with 114 additions and 67 deletions

View file

@ -10,6 +10,9 @@ import (
// that changes shard's memory due to the "read-only" shard's mode.
var ErrReadOnlyMode = errors.New("shard is in read-only mode")
// ErrDegradedMode is returned when operation requiring metabase is executed in degraded mode.
var ErrDegradedMode = errors.New("shard is in degraded mode")
// SetMode sets mode of the shard.
//
// Returns any error encountered that did not allow