]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
storage/immutable.py: make remote_abort btell the storage server about aborted buckets.
authorKevan Carstensen <kevan@isnotajoke.com>
Thu, 15 Jul 2010 23:21:05 +0000 (16:21 -0700)
committerKevan Carstensen <kevan@isnotajoke.com>
Thu, 15 Jul 2010 23:21:05 +0000 (16:21 -0700)
src/allmydata/storage/immutable.py

index 0b43b59861ab38fa41c85b81bd84da92ad253be0..b7c4a9f9eaa0a5c29861c22d8219bb8b90bfccfc 100644 (file)
@@ -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):