[#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
|
@ -76,3 +76,9 @@ func (c *cache) setMode(ctx context.Context, m mode.Mode, ignoreErrors bool) err
|
|||
func (c *cache) readOnly() bool {
|
||||
return c.mode.ReadOnly()
|
||||
}
|
||||
|
||||
// noMetabase returns true if c is operating without the metabase.
|
||||
// `c.modeMtx` must be taken.
|
||||
func (c *cache) noMetabase() bool {
|
||||
return c.mode.NoMetabase()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue