Skip to content

Instantly share code, notes, and snippets.

Created August 27, 2015 22:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
commit b51f7d1d81179d7be105681adcde00d2fafed943
Author: Clay Gerrard <>
Date: Thu Aug 27 15:09:29 2015 -0700
wip: fix tombstone purge
Change-Id: Ib9a42f412fb90d51959efce886c0f8952aba8d85
diff --git a/swift/obj/ b/swift/obj/
index 51158a0..eb32703 100644
--- a/swift/obj/
+++ b/swift/obj/
@@ -2164,7 +2164,11 @@ class ECDiskFile(BaseDiskFile):
:param frag_index: a fragment archive index, must be a whole number.
- for ext in ('.data', '.ts'):
+ exts = ['.ts']
+ # when frag_index is None it's not possible to build a data file name
+ if frag_index is not None:
+ exts.append('.data')
+ for ext in exts:
purge_file = self.manager.make_on_disk_filename(
timestamp, ext=ext, frag_index=frag_index)
remove_file(os.path.join(self._datadir, purge_file))
diff --git a/swift/obj/ b/swift/obj/
index 99e964c..31b4698 100644
--- a/swift/obj/
+++ b/swift/obj/
@@ -542,6 +542,9 @@ class ObjectReconstructor(Daemon):
df.purge(Timestamp(timestamp), frag_index)
except DiskFileError:
+ self.logger.exception(
+ 'Unable to purge DiskFile (%r %r %r)',
+ object_hash, timestamp, frag_index)
def process_job(self, job):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment