[#1086] engine: Do not use metabase if shard looks bad
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
9d73f9c2c6
commit
6a39c3d15e
2 changed files with 6 additions and 3 deletions
|
@ -84,6 +84,7 @@ func (e *StorageEngine) head(ctx context.Context, prm HeadPrm) (HeadRes, error)
|
|||
shPrm.SetRaw(prm.raw)
|
||||
|
||||
e.iterateOverSortedShards(prm.addr, func(_ int, sh hashedShard) (stop bool) {
|
||||
shPrm.ShardLooksBad = sh.errorCount.Load() >= e.errorsThreshold
|
||||
res, err := sh.Head(ctx, shPrm)
|
||||
if err != nil {
|
||||
switch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue