[#959] writecache: Avoid manipulation with cache in DEGRADED
mode
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d433b49265
commit
3195142d67
6 changed files with 35 additions and 1 deletions
|
@ -41,6 +41,9 @@ func (c *cache) Put(ctx context.Context, prm common.PutPrm) (common.PutRes, erro
|
|||
if c.readOnly() {
|
||||
return common.PutRes{}, ErrReadOnly
|
||||
}
|
||||
if c.noMetabase() {
|
||||
return common.PutRes{}, ErrDegraded
|
||||
}
|
||||
|
||||
sz := uint64(len(prm.RawData))
|
||||
if sz > c.maxObjectSize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue