Consider an unversioned bucket with only eventual consistency.
Suppose I just uploaded an object, and now I delete it. The delete request goes to a server to which the object has not yet propagated.
Now, it seems to me, there are just three things that can happen:
The server remembers the delete operation, and will thus remove the object once it arrives at this server.
The server replies with "404 Not found", and the object continues to exist.
The server replies with "201 No data", forgets the delete operation and the object continues to exist.
Answer 1 would impl开发者_如何学编程y that every S3 server has to remember every delete request it receives, in case it later receives an the corresponding object from a another server. The only way to reset this memory would be some sort of global atomic sync of the entire S3 cluster (so the server can be sure that there are no outstanding updates for the deletions that it wants to forget), which I consider highly unlikely. A periodic timeout of the memorized removals, however, would break the eventual consistency guarantee if the object still shows up later.
Answer 2, on the other hand, implies that if
- I upload an object to server A
- I upload a new version of the object to server B
- I delete the object on server B
- Only now server B hears from server A about the upload
..so I would end up with an outdated version of the object, which breaks the eventual consistency guarantee.
Answer 3 also means that the eventual consistency guarantee is broken , because the object will still exist after a delete request was issued.
So basically all three answers seem equally unlikely. Am I missing something?
精彩评论