Handling of ‘409 Conflict’ By the Proxy

Asked by Archita Gshosh

If the backend servers receive a put request with a lower timestamp than the timestamp of the stored object, it sends ‘409 Conflict’ to the proxy. The proxy then returns ‘202 Accepted’ to the client, which is not the right response because the update is rejected for being an old one. Moreover, once the client receives ‘202 Accepted’, it sends the entire data file to the proxy. This step is completely unnecessary and wastes bandwidth as the data will not be stored anyway.
So, my doubt is, why is the ‘202 Accepted’ response in the first place? This response is different from the ‘204 Created’ response when the PUT operation succeeds. Should not the proxy send a response to the client that stops it from sending the data file and conveys the correct message rather than saying ‘Accepted’?
Steps to recreate the scenario:
a) Make a PUT request from the client. Wait for it to succeed.
b) Set the proxy clock (as this is the timestamp used for the comparison) to an older value than the current time. For example, if the clock is at 10 am, then set it to 9.30 am, or any other value that is less than 10 am. This will simulate the behavior of a delayed request.
c) Make another PUT request for the same object. This one will get the new proxy timestamp which is older than the previous one.
d) Check tcpdump for this request at the proxy node.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu swift Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Sounds like a bug to me.

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#2

I agree with actionparsnip I looked through more than 200 bug reports 81 in progress for fix on Openstack Swift and Ubuntu Swift package none of the bug reports were exactly the same as your description. I would file a bug report.
When the '204 created' response check the code for the [value] 0, -1 etc. it may be just in changing its value or check to see if it is commented out and returning a '202'

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.