]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Bug fix: deque must be unbounded
authorDavid Stainton <dstainton415@gmail.com>
Wed, 15 Apr 2015 18:13:41 +0000 (18:13 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Fri, 17 Apr 2015 17:13:50 +0000 (18:13 +0100)
If using a bounded deque then:
"""
Once a bounded length deque is full, when new items are added, a corresponding number of items are discarded from the opposite end.
"""

This bug was introduced at commit 87657eb382da05039cce99862691efcc27243193

src/allmydata/frontends/drop_upload.py

index 0dfe42b7d88c723f452994891085ff5ed753c452..ffabad46c0984fa42566507aa23749cab57dfdaa 100644 (file)
@@ -17,7 +17,7 @@ class DropUploader(service.MultiService):
     name = 'drop-upload'
 
     def __init__(self, client, upload_dircap, local_dir_utf8, inotify=None,
-                 deque_max_len=100, pending_delay=1.0):
+                 pending_delay=1.0):
         service.MultiService.__init__(self)
 
         try:
@@ -37,7 +37,7 @@ class DropUploader(service.MultiService):
         self._convergence = client.convergence
         self._local_path = FilePath(local_dir)
 
-        self._upload_deque = deque(maxlen=deque_max_len)
+        self._upload_deque = deque()
         self.is_upload_ready = False
 
         if inotify is None: