Kota Tsuyuzaki 8f1c7409e7 Don't send commits for quorum *BAD* requests on EC
In EC PUT request case, proxy-server may send commits to object-servers
it may make .durable file even though the request failed due to a lack
of quorum number.

For example:
- Considering the case that almost all object-servers fail by 422
  Unprocessable Entity
- Using ec scheme 4 + 2
- 5 (quorum size) object-server failed with 422, 1 object-servers
  succeeded as 201 created

How it works:
- Client creates a PUT request
- Proxy will open connections to backend object-servers
- Proxy will send whole encoded chunks to object-servers
- Proxy will send content-md5 as footers.
- Proxy will get responses [422, 422, 422, 422, 422, 201] (currently
  this list will be regarded as "we have quorum response")
- And then proxy will send commits to object-servers (the only
  object-server with 201 will create .durable file)
- Proxy will return 503 because the commits results in no response
  statuses from object-servers except the 201 node.

This patch fixes the quorum handling at ObjectController to check
that it has *successful* quorum responses before sending durable commits.

Closes-Bug: #1491748
Change-Id: Icc099993be76bcc687191f332db56d62856a500f
2015-09-29 05:56:12 -07:00
..