EC concurrent PUT same file success but file is corrupt
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(
3. Process A writes finish and linkat 1234567890.
4. Process B writes finish and try to linkat 1234567890.
5. Process B linkat fail and unlink original 1234567890.
6. Process A receives commit command and rename 1234567890.
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