From: Kevan Carstensen Date: Thu, 15 Jul 2010 23:21:05 +0000 (-0700) Subject: storage/immutable.py: make remote_abort btell the storage server about aborted buckets. X-Git-Tag: allmydata-tahoe-1.7.1~16 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/install.html?a=commitdiff_plain;h=6374f4307f6e48b44de2bd88087ccf03db94d2b4;p=tahoe-lafs%2Ftahoe-lafs.git storage/immutable.py: make remote_abort btell the storage server about aborted buckets. --- diff --git a/src/allmydata/storage/immutable.py b/src/allmydata/storage/immutable.py index 0b43b598..b7c4a9f9 100644 --- a/src/allmydata/storage/immutable.py +++ b/src/allmydata/storage/immutable.py @@ -279,13 +279,20 @@ class BucketWriter(Referenceable): def _abort(self): if self.closed: return + os.remove(self.incominghome) # if we were the last share to be moved, remove the incoming/ # directory that was our parent parentdir = os.path.split(self.incominghome)[0] if not os.listdir(parentdir): os.rmdir(parentdir) + self._sharefile = None + # We are now considered closed for further writing. We must tell + # the storage server about this so that it stops expecting us to + # use the space it allocated for us earlier. + self.closed = True + self.ss.bucket_writer_closed(self, 0) class BucketReader(Referenceable):