开发者

What happens when deleting a not-yet-propagated object in Amazon S3?

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:

  1. The server remembers the delete operation, and will thus remove the object once it arrives at this server.

  2. The server replies with "404 Not found", and the object continues to exist.

  3. 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

  1. I upload an object to server A
  2. I upload a new version of the object to server B
  3. I delete the object on server B
  4. 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜