From ffc7618270522bb4550d29a11a81ab5aeca42d99 Mon Sep 17 00:00:00 2001 From: Peter Portante Date: Wed, 31 Oct 2012 17:16:07 -0400 Subject: object-storage: swift-diff removal: hide obj only Towards swift-diff removal: hide object_only behavior inside DiskDir class objects. See BZ 870589 (https://bugzilla.redhat.com/show_bug.cgi?id=870589) One of the last few reasons for having the swift diff is the need to update the account and container information from the file system when the configuration is not for object-only use (meaning, other updates to the file system can come from clients other than UFO, which means UFO currently has to generate the necessary metadata for each request instead of caching it). This change moves that logic into the DiskDir class methods so that the container and account server code does not have to track that. Change-Id: If0970c77c72245facd09c2035083e681d6d80303 BUG: 870589 Signed-off-by: Peter Portante Reviewed-on: http://review.gluster.org/4176 Reviewed-by: Pete Zaitcev Reviewed-by: Kaleb KEITHLEY Tested-by: Kaleb KEITHLEY Reviewed-by: Mohammed Junaid --- swift/1.4.8/swift.diff | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'swift/1.4.8/swift.diff') diff --git a/swift/1.4.8/swift.diff b/swift/1.4.8/swift.diff index 5ce314f5525..c29199461e2 100644 --- a/swift/1.4.8/swift.diff +++ b/swift/1.4.8/swift.diff @@ -18,7 +18,7 @@ index d195d34..ef625ff 100644 }, ) diff --git a/swift/account/server.py b/swift/account/server.py -index 800b3c0..78fbf07 100644 +index 800b3c0..c34d967 100644 --- a/swift/account/server.py +++ b/swift/account/server.py @@ -1,4 +1,5 @@ @@ -63,18 +63,8 @@ index 800b3c0..78fbf07 100644 hsh = hash_path(account) db_dir = storage_directory(DATADIR, part, hsh) db_path = os.path.join(self.root, drive, db_dir, hsh + '.db') -@@ -153,6 +164,9 @@ class AccountController(object): - broker.stale_reads_ok = True - if broker.is_deleted(): - return HTTPNotFound(request=req) -+ if Gluster_enabled() and not Glusterfs.OBJECT_ONLY: -+ broker.list_containers_iter(None, None,None, -+ None, None) - info = broker.get_info() - headers = { - 'X-Account-Container-Count': info['container_count'], diff --git a/swift/container/server.py b/swift/container/server.py -index 8a18cfd..e39f5ef 100644 +index 8a18cfd..f5346ce 100644 --- a/swift/container/server.py +++ b/swift/container/server.py @@ -1,4 +1,5 @@ @@ -121,16 +111,6 @@ index 8a18cfd..e39f5ef 100644 hsh = hash_path(account, container) db_dir = storage_directory(DATADIR, part, hsh) db_path = os.path.join(self.root, drive, db_dir, hsh + '.db') -@@ -245,6 +257,9 @@ class ContainerController(object): - broker.stale_reads_ok = True - if broker.is_deleted(): - return HTTPNotFound(request=req) -+ if Gluster_enabled() and not Glusterfs.OBJECT_ONLY: -+ broker.list_objects_iter(None, None, None, None, -+ None, None) - info = broker.get_info() - headers = { - 'X-Container-Object-Count': info['object_count'], diff --git a/swift/obj/server.py b/swift/obj/server.py index 9cca16b..7a671c2 100644 --- a/swift/obj/server.py -- cgit