storageserver: include metadata in the sizelimit, at least after the bucket has been closed

This commit is contained in:
Brian Warner 2007-07-03 17:38:49 -07:00
parent 94e6e6160b
commit a1c97aa0be
2 changed files with 4 additions and 4 deletions

View 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):

View 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):