Write timeout bug in proxy server
Bug #651598 reported by
gholt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
High
|
clayg |
Bug Description
The proxy server during object puts where a write timeout to an object server will catch the exception, log it, and then proceed to send the next chunk to that object server later. This behavior can cause the object server to return an odd etag causing a 422 later from the proxy. We should close that object server connection on a write timeout and return a 5xx when we have too few connections left (< replicas / 2).
Related branches
lp:~clay-gerrard/swift/write_timeout_fix
- gholt (community): Approve
- Chuck Thier (community): Approve
-
Diff: 1008 lines (+283/-75)2 files modifiedswift/proxy/server.py (+12/-2)
test/unit/proxy/test_server.py (+271/-73)
Changed in swift: | |
assignee: | nobody → clayg (clay-gerrard) |
Changed in swift: | |
milestone: | none → 1.1.0 |
status: | New → In Progress |
Changed in swift: | |
status: | In Progress → Fix Committed |
Changed in swift: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
In [6]: mylist = [1,2,3]
in the proxy the stale connection is being "removed" on error, but it causes one of the remaining connections to miss a chunk.
In [7]: mybytes = ['a', 'b', 'c']
In [8]: for byte in mybytes:
...: for conn in mylist:
...: if conn == 1:
...: mylist.remove(conn)
...: print byte, conn
...:
...:
a 1
a 3
b 2
b 3
c 2
c 3