race condition - upload newer version files VS fetching lastest files

Asked by Shengjie Min

I've been looking through the code and I didn't manage to find any evidence which prevents this:

It's 3 replicas cluster environment. If you have a file, let's say, version 1 uploaded in swift cluster already. Now you upload a newer version, version 2, to swift cluster with the same file name. It overwrites the older version on whatever zone you hit first. We know eventually, three replicas will be synched to version 2. BUT, Is it possible that, before the replication process completes, we would have two version 1 replicas in other two zones and one version 2 replica in the current zone.

And when user try to download the file from the cluster before the replication completion. Does that mean, he/she has chances to get the older version instead of the latest?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Shengjie Min
Solved:
Last query:
Last reply:
Revision history for this message
Ivan Izhikov (iizhikov) said :
#1

Yes, and that's why it is called "eventually consistent object/blob store". You should forget about ACID when you are using Swift.
It works just fine when you upload new picture or video to your web-site. But it should never be used in applications where ACID is the must, such as banking software.

Revision history for this message
Shengjie Min (shengjie-min) said :
#2

thanks Ivan, it makes sense.