Skip to content

Commit 2ed102d

Browse files
committed
docs
1 parent 8e78b28 commit 2ed102d

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

src/Core/ServerSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ namespace DB
10051005
)", 0) \
10061006
DECLARE(Bool, storage_shared_set_join_use_inner_uuid, false, "If enabled, an inner UUID is generated during the creation of SharedSet and SharedJoin. ClickHouse Cloud only", 0) \
10071007
DECLARE(UInt64, input_format_parquet_metadata_cache_max_size, 500000000, "Maximum size of parquet file metadata cache", 0) \
1008-
DECLARE(UInt64, object_storage_list_objects_cache_size, 5000000, "Maximum size of ObjectStorage list objects cache in bytes. Zero means disabled.", 0) \
1008+
DECLARE(UInt64, object_storage_list_objects_cache_size, 500000000, "Maximum size of ObjectStorage list objects cache in bytes. Zero means disabled.", 0) \
10091009
DECLARE(UInt64, object_storage_list_objects_cache_max_entries, 1000, "Maximum size of ObjectStorage list objects cache in entries. Zero means disabled.", 0) \
10101010
DECLARE(UInt64, object_storage_list_objects_cache_ttl, 3600, "Time to live of records in ObjectStorage list objects cache in seconds. Zero means unlimited", 0) \
10111011
// clang-format on

src/Disks/ObjectStorages/IObjectStorage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class IObjectStorage
126126

127127
virtual std::string getDescription() const = 0;
128128

129-
// todo arthur add docs
129+
/// Storage name + authentication unique id. Used for securing ListObjects cache
130130
virtual std::optional<std::string> getIdentityFingerprint() const = 0;
131131

132132
virtual const MetadataStorageMetrics & getMetadataStorageMetrics() const;

src/Storages/Cache/ObjectStorageListObjectsCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ObjectStorageListObjectsCache
2828
const std::chrono::steady_clock::time_point & expires_at_ = std::chrono::steady_clock::now(),
2929
std::optional<UUID> user_id_ = std::nullopt);
3030

31-
// object storage name + account name
31+
// object storage name + account
3232
std::string storage_identity;
3333
std::string bucket;
3434
std::string prefix;

src/Storages/ObjectStorage/StorageObjectStorageSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ std::shared_ptr<IObjectIterator> StorageObjectStorageSource::createFileIterator(
172172
}
173173
else
174174
{
175-
cache_ptr = std::make_unique<GlobIterator::ListObjectsCacheWithKey>(&cache, cache_key);
175+
cache_ptr = std::make_unique<GlobIterator::ListObjectsCacheWithKey>(cache, cache_key);
176176
object_iterator = object_storage->iterate(configuration->getPathWithoutGlobs(), query_settings.list_object_keys_size);
177177
}
178178
}

src/Storages/ObjectStorage/StorageObjectStorageSource.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,20 @@ class StorageObjectStorageSource::ReadTaskIterator : public IObjectIterator
164164
class StorageObjectStorageSource::GlobIterator : public IObjectIterator, WithContext
165165
{
166166
public:
167+
/*
168+
* Helper struct so `GlobIterator` does not need to re-construct the cache key all the time
169+
*/
167170
struct ListObjectsCacheWithKey
168171
{
169-
ListObjectsCacheWithKey(ObjectStorageListObjectsCache * cache_, const ObjectStorageListObjectsCache::Key & key_) : cache(cache_), key(key_) {}
172+
ListObjectsCacheWithKey(ObjectStorageListObjectsCache & cache_, const ObjectStorageListObjectsCache::Key & key_) : cache(cache_), key(key_) {}
170173

171174
void set(ObjectStorageListObjectsCache::Value && value) const
172175
{
173-
cache->set(key, std::make_shared<ObjectStorageListObjectsCache::Value>(std::move(value)));
176+
cache.set(key, std::make_shared<ObjectStorageListObjectsCache::Value>(std::move(value)));
174177
}
175178

176179
private:
177-
ObjectStorageListObjectsCache * cache;
180+
ObjectStorageListObjectsCache & cache;
178181
ObjectStorageListObjectsCache::Key key;
179182
};
180183

0 commit comments

Comments
 (0)