noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

New Feature: Local Cache propagate namespace read error on discarded cache data

Open guymguym opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. Continuation of #5714 and #5715 - Local Cache with Namespace Bucket and Discard Tier, in order for the namespace reads from "optional" resource to really be optional and fallback to "source_of_truth" we want to propagate read errors on discarded data with a specific error to the namespace, and as optimization we can also return partial reads.

Describe the solution you'd like Namespace resource that uses data bucket should return a "DataDiscarded" error as soon as possible to the endpoint so that the namespace can identify it and fallback to read from another resource (the source_of_truth in this case).

For large objects it might be useful to allow partial ranges to be returned from the local cache even if other ranges of the object were discarded.

Describe alternatives you've considered We can also leave the current behaviour, which fails with internal error when the data was discarded, but we want to make sure there are no delays and that once we find out we need to get data from the other resource we already request it.

Supporting partial reads from the local cache might be useful for large objects, but in general it might be a complex optimization which can be postponed.

guymguym avatar Sep 08 '19 12:09 guymguym