summaryrefslogtreecommitdiff
path: root/swift/container/backend.py
diff options
context:
space:
mode:
authorJianjian Huo <jhuo@nvidia.com>2023-03-08 15:45:26 -0800
committerJianjian Huo <jhuo@nvidia.com>2023-04-17 09:49:26 -0700
commit71d507f8e17295fac1a97c8aab3883e042665fc4 (patch)
treebad74dd24e1c7f713edac3a8642c47a16fd62c48 /swift/container/backend.py
parent2e89e92cb77bd5341a1a290bdfc9402b02f71ab6 (diff)
downloadswift-71d507f8e17295fac1a97c8aab3883e042665fc4.tar.gz
Proxy: restructure cached listing shard ranges
Updating shard range cache has been restructured and upgraded to v2 which only persist the essential attributes in memcache (see Related-Change). This is the following patch to restructure the listing shard ranges cache for object listing in the same way. UpgradeImpact ============= The cache key for listing shard ranges in memcached is renamed from 'shard-listing/<account>/<container>' to 'shard-listing-v2/<account>/<container>', and cache data is changed to be a list of [lower bound, name]. As a result, this will invalidate all existing listing shard ranges stored in the memcache cluster. Co-Authored-By: Alistair Coles <alistairncoles@gmail.com> Related-Change: If98af569f99aa1ac79b9485ce9028fdd8d22576b Change-Id: I54a32fd16e3d02b00c18b769c6f675bae3ba8e01
Diffstat (limited to 'swift/container/backend.py')
-rw-r--r--swift/container/backend.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/swift/container/backend.py b/swift/container/backend.py
index c1842d9bd..e6648038f 100644
--- a/swift/container/backend.py
+++ b/swift/container/backend.py
@@ -32,7 +32,7 @@ from swift.common.utils import Timestamp, encode_timestamps, \
decode_timestamps, extract_swift_bytes, storage_directory, hash_path, \
ShardRange, renamer, MD5_OF_EMPTY_STRING, mkdirs, get_db_files, \
parse_db_filename, make_db_file_path, split_path, RESERVED_BYTE, \
- filter_shard_ranges, ShardRangeList
+ filter_namespaces, ShardRangeList
from swift.common.db import DatabaseBroker, utf8encode, BROKER_TIMEOUT, \
zero_like, DatabaseAlreadyExists, SQLITE_ARG_LIMIT
@@ -1866,8 +1866,8 @@ class ContainerBroker(DatabaseBroker):
if includes:
return shard_ranges[:1] if shard_ranges else []
- shard_ranges = filter_shard_ranges(shard_ranges, includes,
- marker, end_marker)
+ shard_ranges = filter_namespaces(
+ shard_ranges, includes, marker, end_marker)
if fill_gaps:
own_shard_range = self.get_own_shard_range()