GET with Storlet execution generates wrong content with automatic retry in proxy-server
Bug #1534414 reported by
Takashi Kajinami
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
storlets |
Fix Released
|
Undecided
|
Takashi Kajinami |
Bug Description
When proxy-server gets timeout while it is transferring object in GET, it automatically retry to another object-server to get the rest of the object content using range header.
When it happens while executing storlets, we get the object content modified with storlet at first, then get the original object content(because object-server doesn't execute storlets when it finds range header) after that retry.
As the result, we get the very odd content, consists of modified content and original content.
description: | updated |
Changed in storlets: | |
assignee: | nobody → Takashi Kajinami (kajinamit) |
information type: | Public → Public Security |
To post a comment you must log in.
During the IRC call we have identified two different semantics for storlets with ranges
1. The range specifies the input range for the storlet. That is the storlet is executed on the specified range of the input object. In the below I refer to this as 'input range' semantics
2. The range specifies the output range. That is the storlet is executed on the object from its beginning and the storlet returns only the required range. In the below I refer to this as 'output range' semantics
We have reached the following understandings w.r.t. the range semantics:
* For 'input range' semantics we should use a proprietary header, e.g. X-Storlet-Range that may be added on top of
X-Run-Storlet. At this point I suggest to support a single range.
Moreover, since the storlet output in this case is not known in advance and hence we use chunked transfer encoding, the usage of a
proprietary header helps us bypass HTTP RFC problem, where it is not clear what the returned code should be.
* For 'output range' semantics we should use HTTP standard range headers (plus X-Run-Storlet). In this case either the storlet does not produce the range ans we return 412 or the storlet outputs the exact range and we can return 206. Again, we may want to start with a single range.
Now, for this particular bug (and the related 1534455 bug) we decided to currently do the following:
1. Not support 'output range' semantics. That is return 400 bad request for X-Run-Storlet which carries a range header.
2. Change the current support for 'input range' semantics to be used with X-Storlet-Range - I suggest a single range at this point - and if the proxy gets a timeout and issues a ranged get to another object server (as discussed in this bug) fail the request altogether by not accepting X-Run-Storlet + range at the object servers.
eranrom is to update the docs accordingly.