SWIFT data consistency

Asked by GP on 2014-01-10

Since swift stores by default at least 3 replicas of data and last write wins, how does swift handle a file corruption situation? If you have a drive that's headed towards failure, but hasn't failed completely yet and corrupts some of the data on it how does swift detect this and handle it?

It would seem that it might detect the corrupted object as the latest write and replicate that throughout the rest of the cluster. Or all the timestamps would be the same, but the hashes would be different so how would it know which version is the correct one?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Samuel Merritt
Solved:
2014-01-10
Last query:
2014-01-10
Last reply:
2014-01-10
Best Samuel Merritt (torgomatic) said : #1

The object auditor reads entire objects and compares their MD5 checksums to the ones stored in their metadata (in xattrs). If they don't match, the object is quarantined so that replication can replace it with a good copy.

Similarly, if you GET an object, the object server does the same computation and will quarantine if necessary.

GP (garrett-s-page) said : #2

Thanks Samuel Merritt, that solved my question.