EC: Durable frag_set is reclaimable in racing condition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Durable fragment set (which has both .data and .durable) seems to be able to be reclaimed (deleted in the worst case) in racing condition.
For example, if all PUTs are in older than reclaime age (i.e. request X-Timestamp << (now - reclaime_age), e.g. reconstruction PUT at reconstructor, too slow container-sync ), here, I describes the case for reconstructor:
Imagine we have 2 different timestamps with same path (overwritten) but unfortunately Swift keeps both due to brain split status and then, the split fixed.
the timestamps are t0 < t1. << (now - reclaim_age).
and now both reconstuctors attempt to fix the object.
1. a reconstructor (t0) attempt to a PUT and object-server make a t0.data file
2: another reconstructor (t1) makes a PUT and object-server makes a t1.data file.
likely:
[a reconstructor] ---(PUT t0)--> [an object-sever] <--(PUT t1) ---[another reconstructor]
These are obviously different requests but both requests touch the same path in the device and at this time, t0.data and t1.data in the object-server. After this,
3. object-server makes a t0.durable and call cleanup_list_dir. This will trigger to remove t1.data because it doesn't have .durable and older than reclaim age.
4. After that, object-server makes a t1.durable and call cleanup_list_dir will remove all .data .durable file older than the newest t1.durable.
5. finally all .data files are gone, unexpectedly.
So the state 3-4 racing condition seems to be able to happen (even if it's rarely) unless I might be missing something.
I'm still in deep dive the sequence but I'd like to welcome to help me to correct this status.
Changed in swift: | |
status: | Confirmed → In Progress |
Fix proposed to branch: master /review. openstack. org/289756
Review: https:/