mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
storageserver: include metadata in the sizelimit, at least after the bucket has been closed
This commit is contained in:
parent
94e6e6160b
commit
a1c97aa0be
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user