EC concurrent PUT same file success but file is corrupt

Bug #1971686 reported by bakawang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned

Bug Description

If two request PUT the same file name at same time, it's possible that one of requests success but file is corrupt.

This is what happens:

1. Swift use EC and encryption at rest.
2. Request A and Request B PUT same file at same time (A's content will different from B's because of encryption).
2. Object server process A and process B PUT same name file with same timestamp(1234567890.12345).
3. Process A writes finish and linkat 1234567890.12345#1.data success.
4. Process B writes finish and try to linkat 1234567890.12345#1.data.
5. Process B linkat fail and unlink original 1234567890.12345#1.data then re-linkat success.
6. Process A receives commit command and rename 1234567890.123455#1.data(generated by B) to 1234567890.12345#1#d.data
7. Request A returns success and request B fail, but if A's fragments generated by B more than parity the file becomes corrupt.

Environment:
swift version - wallaby

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.