Bug #8702
closed
[Keep] HEAD request should do a checksum of the blob without sending it
Added by Nico César almost 9 years ago.
Updated almost 9 years ago.
Description
Migrations to different storage volumes often include a verification phase.
we should have a method (preferably HEAD ) that will make a check of the block without actually retrying it.
- Project changed from 40 to Arvados
- Description updated (diff)
- Subject changed from [KEEPSTORE] HEAD request should do a checksum of the blob without sending it to [Keep] HEAD request should do a checksum of the blob without sending it
- Category set to Keep
- Status changed from New to Feedback
This seems to be done already. Go's HTTP library automatically suppresses the body for HEAD requests, and Keepstore accepts HEAD /{hash}
.
tomclegg@shell:~$ time curl --head -H "Authorization: OAuth2 $ARVADOS_API_TOKEN" "http://keep6.c97qk.arvadosapi.com:25107/a59f44608b780c968af43da75cc9d6e8+67108864+Ad9785dc3247c083f49c7524690e140659bfef7b3@56fdbbaa"
HTTP/1.1 200 OK
Content-Length: 67108864
Content-Type: application/octet-stream
Date: Fri, 18 Mar 2016 00:11:29 GMT
real 0m2.036s
user 0m0.000s
sys 0m0.014s
Note: curl -X HEAD
is buggy (as of curl 7.35.0): it forgets that method=HEAD affects response handling. When it sees Content-Length: (non-zero)
in the response header it just sits around waiting for bytes to arrive, which is correct for non-HEAD requests but incorrect for HEAD.
Tom Clegg wrote:
This seems to be done already. Go's HTTP library automatically suppresses the body for HEAD requests, and Keepstore accepts HEAD /{hash}
.
Is this also doing the checksum check? if so, we can close the ticket and unblock #8724
- Status changed from Feedback to Resolved
HEAD and GET requests use the same handling code, which does a checksum to determine the response code, so yes.
Also available in: Atom
PDF