[#1186] engine: Read object directly from blobstor in case of conflicts

Metabase is expected to contain actual information about objects stored
in shard. If the object is present in metabase but is missing from
blobstor, peform an additional attempt to fetch it directly without
consulting metabase. Such a situation is unexpected, so error counter
is increased for the shard which has the object in the metabase. We
don't increase error counter for the shard which has the object in
blobstor, because some garbage can be expected there. In this
implementation there is no overhead for objects which are really
missing, i.e. are not present in any metabase.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-02-22 10:20:33 +03:00 committed by Alex Vanin
parent 6e6f3648d2
commit 69e1e6ca20
4 changed files with 151 additions and 48 deletions

View file

@ -95,7 +95,7 @@ func (s *Shard) GetRange(prm *RngPrm) (*RngRes, error) {
return obj.Object(), nil
}
obj, err := s.fetchObjectData(prm.addr, big, small)
obj, _, err := s.fetchObjectData(prm.addr, false, big, small)
return &RngRes{
obj: obj,