From 9e6fbbcee91105ea8e5fa67a86b4b5d3054e32aa Mon Sep 17 00:00:00 2001 From: Luis Pabon Date: Fri, 26 Jul 2013 15:56:26 -0400 Subject: perf: Container and account performance inc * Container and accounts performance increase by removing the need to update either the object count or the container count, respectively. New hidden configuratoins added to re-enable the functionality. * object_only configuratoin removed from fs.conf and replaced with a hidden configuration. The new hidden configuration reports gratuituosly crated directories as objects, to support a compatibility behavior with previous version 1.4.8 (even though it was incorrect). BUG 988969: https://bugzilla.redhat.com/show_bug.cgi?id=988969 Change-Id: Idca20b8629ec38606ff5692fe62bc2cadabffc86 Signed-off-by: Luis Pabon Reviewed-on: http://review.gluster.org/5403 Reviewed-by: Peter Portante Tested-by: Peter Portante Reviewed-on: http://review.gluster.org/5504 --- gluster/swift/common/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gluster/swift/common/utils.py') diff --git a/gluster/swift/common/utils.py b/gluster/swift/common/utils.py index 5152861..522d307 100644 --- a/gluster/swift/common/utils.py +++ b/gluster/swift/common/utils.py @@ -243,7 +243,10 @@ def _update_list(path, cont_path, src_list, reg_file=True, object_count=0, obj_path = path.replace(cont_path, '').strip(os.path.sep) for obj_name in src_list: - if not reg_file and Glusterfs.OBJECT_ONLY: + # If it is not a reg_file then it is a directory. + if not reg_file and not Glusterfs._implicit_dir_objects: + # Now check if this is a dir object or a gratuiously crated + # directory metadata = \ read_metadata(os.path.join(cont_path, obj_path, obj_name)) if not dir_is_object(metadata): -- cgit