How Swift response for the scenario that file overwriting and deletion are happened simultaneously(overwriting first then deletion)

StackOverflow https://stackoverflow.com/questions/19942958

  •  30-07-2022
  •  | 
  •  

Question

Under the condition of "allow_versions" set to "FALSE" or "TRUE", for both cases, how Swift response for the scenario that a file is under overwriting while delete request come in simultaneously(with the order of overwriting first then deletion)?

Please share your thoughts.

Many thanks!

Was it helpful?

Solution 2

Well, a quick summary comes, though still a very high level view but hope it helps understanding how it works under the hood.

The diagram(below link) sets two simultaneous scenarios(A and B) against the enable/disable of the Swift object versioning feature. The outcome for each scenario is shown in the diagram.

Download the diagram.

Please share your thoughts if any.

OTHER TIPS

The timestamp assigned to the request coming in to the proxy is what will ultimately decide which "last" write wins.

If you have a long running upload and issue the delete during, the tombstone will have a later timestamp and will eventually take precedence even if the upload finishes after.

When using the container versioning feature, overwriting in a versioned container will cause the object data to be COPY'd off the current tip before the PUT data is sent to the storage node with the assigned timestamp. For deletes in a versioned container the "previous version" is discovered at the time the overwriting request is made and subject to eventual consistency in the container listing, but is only deleted once it has been copied into the current location for the object.

More information about object versioning is available here: http://docs.openstack.org/developer/swift/overview_object_versioning.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top