[#1559] shard: Change Degraded mode string representation

It is a flag, but is a `degraded-read-write` mode for a user.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-19 16:12:37 +03:00 committed by fyrchik
parent fabe717d32
commit 50e28f22f9
3 changed files with 4 additions and 5 deletions

View file

@ -10,8 +10,7 @@ const (
// DegradedReadOnly is a Mode value for shard that is set automatically
// after a certain number of errors is encountered. It is the same as
// `mode.ReadOnly` but also enables fallback algorithms for getting object
// in case metabase is corrupted.
// `mode.Degraded` but also is read-only.
DegradedReadOnly = Degraded | ReadOnly
)
@ -34,7 +33,7 @@ func (m Mode) String() string {
case ReadOnly:
return "READ_ONLY"
case Degraded:
return "DEGRADED"
return "DEGRADED_READ_WRITE"
case DegradedReadOnly:
return "DEGRADED_READ_ONLY"
}