|
83 | 83 | #include <Storages/System/attachSystemTables.h>
|
84 | 84 | #include <Storages/System/attachInformationSchemaTables.h>
|
85 | 85 | #include <Storages/Cache/registerRemoteFileMetadatas.h>
|
| 86 | +#include <Storages/Cache/ObjectStorageListObjectsCache.h> |
86 | 87 | #include <AggregateFunctions/registerAggregateFunctions.h>
|
87 | 88 | #include <Functions/UserDefined/IUserDefinedSQLObjectsStorage.h>
|
88 | 89 | #include <Functions/registerFunctions.h>
|
@@ -331,6 +332,10 @@ namespace ServerSetting
|
331 | 332 | extern const ServerSettingsFloat min_os_cpu_wait_time_ratio_to_drop_connection;
|
332 | 333 | extern const ServerSettingsFloat max_os_cpu_wait_time_ratio_to_drop_connection;
|
333 | 334 | extern const ServerSettingsUInt64 input_format_parquet_metadata_cache_max_size;
|
| 335 | + extern const ServerSettingsUInt64 object_storage_list_objects_cache_size; |
| 336 | + extern const ServerSettingsUInt64 object_storage_list_objects_cache_max_entries; |
| 337 | + extern const ServerSettingsUInt64 object_storage_list_objects_cache_ttl; |
| 338 | + |
334 | 339 | }
|
335 | 340 |
|
336 | 341 | namespace ErrorCodes
|
@@ -418,6 +423,7 @@ namespace ErrorCodes
|
418 | 423 | extern const int NETWORK_ERROR;
|
419 | 424 | extern const int CORRUPTED_DATA;
|
420 | 425 | extern const int BAD_ARGUMENTS;
|
| 426 | + extern const int STARTUP_SCRIPTS_ERROR; |
421 | 427 | }
|
422 | 428 |
|
423 | 429 |
|
@@ -2426,6 +2432,10 @@ try
|
2426 | 2432 | if (dns_cache_updater)
|
2427 | 2433 | dns_cache_updater->start();
|
2428 | 2434 |
|
| 2435 | + ObjectStorageListObjectsCache::instance().setMaxSizeInBytes(server_settings[ServerSetting::object_storage_list_objects_cache_size]); |
| 2436 | + ObjectStorageListObjectsCache::instance().setMaxCount(server_settings[ServerSetting::object_storage_list_objects_cache_max_entries]); |
| 2437 | + ObjectStorageListObjectsCache::instance().setTTL(server_settings[ServerSetting::object_storage_list_objects_cache_ttl]); |
| 2438 | + |
2429 | 2439 | auto replicas_reconnector = ReplicasReconnector::init(global_context);
|
2430 | 2440 |
|
2431 | 2441 | #if USE_PARQUET
|
|
0 commit comments