tombstone (.ts) object will never be deleted if the hash_suffix exists in the hashes.pkl
Bug #1301728 reported by
Hugo Kou
This bug affects 10 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
High
|
Mahati Chamarthy |
Bug Description
Swift Version : 1.13.0
[object-replicator]
vm_test_mode = yes
reclaim_age = 30
log_level = DEBUG
=======
if the suffix hash of tombstone file were calculated in the hashes.pkl before the reclaim time. The hash value will been wrote in the hashes pickle.
So the .ts file will never be deleted due to the hash no longer in *None*.
https:/
I did not find any code to set the hash value to *None* for .ts under this situation. Even the .ts is over the reclaim_age.
It causes bunch of .ts file remain on disks and consume lots inodes.
Changed in swift: | |
assignee: | nobody → Hugo Kou (tonytkdk) |
status: | New → In Progress |
Changed in swift: | |
status: | In Progress → New |
assignee: | Hugo Kou (tonytkdk) → nobody |
Changed in swift: | |
assignee: | nobody → Brian Cline (briancline) |
status: | New → Confirmed |
Changed in swift: | |
status: | Confirmed → In Progress |
Changed in swift: | |
importance: | Undecided → High |
Changed in swift: | |
assignee: | Brian Cline (briancline) → Mahati Chamarthy (mahati-chamarthy) |
To post a comment you must log in.
There's a unclear description of do_listdir.
:param do_listdir: force existence check for all hashes in the partition
The main job of do_listdir is for adding any missed key of suffix there instead of set the existing value to "None" . That's my understanding from the description. So that the following code looks normal for me.
https:/ /github. com/... .../master/ swift/obj/ diskfile. py......
setdefault returns the value of the key which exists and set None for new key in the dictionary. It's not going to scrub the value of a suffix which already in the pickle.
I'm not sure if developer expected the suffix of .ts suppose to be set in None by this line. If that's the case, then there's a bug(it should be heashes[suff] = None.
Maybe I'm wrong :
Is there any other code to set the value for a suffix which belong to .ts ?
Hugo