]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
storageserver: include metadata in the sizelimit, at least after the bucket has been...
authorBrian Warner <warner@allmydata.com>
Wed, 4 Jul 2007 00:38:49 +0000 (17:38 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 4 Jul 2007 00:38:49 +0000 (17:38 -0700)
src/allmydata/storageserver.py
src/allmydata/test/test_storage.py

index c70d113a056649b5547b561b345235e122d889cb..5c5601f07dcbbc2c8b91755cd1dd1cc9f4cc74cc 100644 (file)
@@ -92,7 +92,7 @@ class BucketWriter(Referenceable):
             pass
             
         self.closed = True
-        self.ss.bucket_writer_closed(self)
+        self.ss.bucket_writer_closed(self, fileutil.du(self.finalhome))
 
 def str2l(s):
     """ split string (pulled from storage) into a list of blockids """
@@ -186,8 +186,8 @@ class StorageServer(service.MultiService, Referenceable):
 
         return alreadygot, bucketwriters
 
-    def bucket_writer_closed(self, bw):
-        self.consumed += bw.allocated_size()
+    def bucket_writer_closed(self, bw, consumed_size):
+        self.consumed += consumed_size
         del self._active_writers[bw]
 
     def remote_get_buckets(self, storage_index):
index 4154cbaf543daad9aa627e422daafe1c863d014b..7d02e1782daaecaa1128950943e3d2d6d114a74f 100644 (file)
@@ -16,7 +16,7 @@ class Bucket(unittest.TestCase):
         fileutil.make_dirs(basedir)
         return incoming, final
 
-    def bucket_writer_closed(self, bw):
+    def bucket_writer_closed(self, bw, consumed):
         pass
 
     def test_create(self):