20318: Route (*KeepClient)Get() through disk cache layer.
The updated implementation maintains the existing calling signature
but has some semantic differences:
The block size returned by Get is now -1 if the block size is not
indicated by the supplied locator. All locators generated by Arvados
include sizes, and Get() doesn't work on bare hashes because they have
no permission signature, so in practice this only comes up for test
cases and keepstore's pull worker.
The url returned by Get is now "" because
* in general it is not necessarily available in principle (data often
comes from the cache instead of a backend server)
* in the cases where it is available in principle, it would be a lot
of trouble to propagate it
* the only known reason to reveal the url is to provide detail about
an error, in which case the error message should already include the
relevant url.
In some cases where the upstream server responds 200 but an error is
detected early in the response content, Get() now returns the error
itself, where the old Get() implementation would have returned a
reader whose Read method returns an error.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
- [DH] services/keepstore/pull_worker.go