[patch] Let us delete objects if back-end lost them

Jim Meyering jim at meyering.net
Thu Aug 11 20:26:45 UTC 2011


Pete Zaitcev wrote:
> If for some reason the back-end loses an object, it cannot be deleted.
> This is a "should not happen" situation, which happens when a filesystem
> checker unlinks something or when sysadmin makes a mistake.
>
> The obious solution is to proceed with removal from the database even if
> fails to find the object (a file in case of filesystem).
>
> However, we cannot simply do ignore errors, because this is how we
> discover that a non-existing object was deleted, and return 404.
> So, we make an extra lookup in the database, and only return an
> error if there was nothing there.
>
> But wait! There's more: why cannot we look up an object before even
> reaching for the back-end? That is because we delete replicated objects
> by first removing them from the database, and then requesting redundant
> iwhd's to delete. They have to proceed with the deletion from their
> back-ends first, and then report 404 if they like. This is a little
> tricky, but works.
>
> This patch also includes a test for this condition (t/delete-missing),
> written by Jim Meyering.
>
> Tracking ticket:
> https://bugzilla.redhat.com/show_bug.cgi?id=710666

This counts as a bug fix, so I've added a NEWS entry:

>From 417858c9ffcd5345f4e04b92c0e54bfd054dfd10 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Thu, 11 Aug 2011 22:20:12 +0200
Subject: [PATCH] doc: mention in NEWS the delete-deleted fix

* NEWS (Bug fixes): Mention the fix from commit 2df124f0.
---
 NEWS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 25b95ba..e122bcf 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ iwhd NEWS                                                   -*- outline -*-

 * Noteworthy changes in release ?.? (????-??-??) [?]

+** Bug fixes
+
+  object deletion now succeeds for an object whose FS-backed file has been
+  removed behind iwhd's back.
+

 * Noteworthy changes in release 0.98 (2011-08-09) [stable]

--
1.7.6.433.g1421f


More information about the iwhd-devel mailing list