Optimistic concurrency in Rackspace OpenStack Cloud File

86 Views Asked by At

How do you practise optimistic concurrency when updating a Cloud File on Rackspace.

In Azure blob storage I would:

  • GET the blob
  • Make a note of its etag
  • Modify the blob
  • Upload the modified blob with etag in an If-None-Match header.

This means if someone else has uploaded the modified blob between my GET and upload, my upload would fail as the etag wouldn't match (I then re-GET then modify and upload again).

ANYWAY, I can't find a facility to do that with Cloud Files. I can get an etag of a blob I plan to modify but I cannot send it back with the If-None-Match header as I would expect. You can send an etag header but this expects an MD5 checksum of the data I'm sending, not what they already have.

As far as I can see there is no Last Modified request header to send either.

What to do here to ensure modifications aren't lost during concurrent work to Cloud Files?

0

There are 0 best solutions below