Skip to content

Instantly share code, notes, and snippets.

@clayg
Created May 19, 2016 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clayg/7a8612c1d6f7ee9c4b4fa9c1fe10cfb3 to your computer and use it in GitHub Desktop.
Save clayg/7a8612c1d6f7ee9c4b4fa9c1fe10cfb3 to your computer and use it in GitHub Desktop.
diff --git a/swift/obj/reconstructor.py b/swift/obj/reconstructor.py
index 2c9e2b4..d006208 100644
--- a/swift/obj/reconstructor.py
+++ b/swift/obj/reconstructor.py
@@ -754,12 +754,18 @@ class ObjectReconstructor(Daemon):
ordered_fis = sorted((len(suffixes), fi) for fi, suffixes
in data_fi_to_suffixes.items())
for count, fi in ordered_fis:
- revert_job = build_job(
- job_type=REVERT,
- frag_index=fi,
- suffixes=data_fi_to_suffixes[fi],
- sync_to=[part_nodes[fi]],
- )
+ try:
+ revert_job = build_job(
+ job_type=REVERT,
+ frag_index=fi,
+ suffixes=data_fi_to_suffixes[fi],
+ sync_to=[part_nodes[fi]],
+ )
+ except Exception:
+ self.logger.exception(
+ 'Failed to build revert job for frag %r in %r '
+ '(nodes: %r, frags: %r)', fi, part_path, part_nodes,
+ ordered_fis)
jobs.append(revert_job)
# now we need to assign suffixes that have no data fragments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment