From fa25f45e6ccc77c46d5cf1a98ab32cc3bd6a5c93 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Thu, 13 Feb 2014 16:40:12 +0100 Subject: [PATCH] Set full_listing to True to avoid the default limit - Swiftclient cuts to 10000 by default the amount of objects listed with get_container. This patch set the full_listing to True. - This patch has no solutions to avoid the high memory consumption when container contains a huge amount of objects. Closes-Bug: #1279804 Change-Id: I2d991baa14f9d4c6a827629c6b43fcc693e0262a --- swsync/containers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swsync/containers.py b/swsync/containers.py index 6c8c359..8561c0a 100644 --- a/swsync/containers.py +++ b/swsync/containers.py @@ -45,6 +45,7 @@ class Containers(object): try: dest_container_stats, dest_objects = swiftclient.get_container( None, dest_token, container, http_conn=dest_storage_cnx, + full_listing=True, ) except(swiftclient.client.ClientException), e: logging.info("error getting container: %s, %s" % ( @@ -81,6 +82,7 @@ class Containers(object): try: orig_container_headers, orig_objects = swiftclient.get_container( None, orig_token, container_name, http_conn=orig_storage_cnx, + full_listing=True, ) except(swiftclient.client.ClientException), e: logging.info("ERROR: getting container: %s, %s" % ( @@ -115,6 +117,7 @@ class Containers(object): try: dest_container_headers, dest_objects = swiftclient.get_container( None, dest_token, container_name, http_conn=dest_storage_cnx, + full_listing=True, ) except(swiftclient.client.ClientException), e: logging.info("ERROR: creating container: %s, %s" % (