|
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>
|
|
156 | 157 | # include <azure/core/diagnostics/logger.hpp>
|
157 | 158 | #endif
|
158 | 159 |
|
| 160 | +#if USE_PARQUET |
| 161 | +# include <Processors/Formats/Impl/ParquetFileMetaDataCache.h> |
| 162 | +#endif |
| 163 | + |
159 | 164 |
|
160 | 165 | #include <incbin.h>
|
161 | 166 | /// A minimal file used when the server is run without installation
|
@@ -326,6 +331,11 @@ namespace ServerSetting
|
326 | 331 | extern const ServerSettingsUInt64 os_cpu_busy_time_threshold;
|
327 | 332 | extern const ServerSettingsFloat min_os_cpu_wait_time_ratio_to_drop_connection;
|
328 | 333 | extern const ServerSettingsFloat max_os_cpu_wait_time_ratio_to_drop_connection;
|
| 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 | + |
329 | 339 | }
|
330 | 340 |
|
331 | 341 | namespace ErrorCodes
|
@@ -413,6 +423,7 @@ namespace ErrorCodes
|
413 | 423 | extern const int NETWORK_ERROR;
|
414 | 424 | extern const int CORRUPTED_DATA;
|
415 | 425 | extern const int BAD_ARGUMENTS;
|
| 426 | + extern const int STARTUP_SCRIPTS_ERROR; |
416 | 427 | }
|
417 | 428 |
|
418 | 429 |
|
@@ -2421,8 +2432,16 @@ try
|
2421 | 2432 | if (dns_cache_updater)
|
2422 | 2433 | dns_cache_updater->start();
|
2423 | 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 | + |
2424 | 2439 | auto replicas_reconnector = ReplicasReconnector::init(global_context);
|
2425 | 2440 |
|
| 2441 | +#if USE_PARQUET |
| 2442 | + ParquetFileMetaDataCache::instance()->setMaxSizeInBytes(server_settings[ServerSetting::input_format_parquet_metadata_cache_max_size]); |
| 2443 | +#endif |
| 2444 | + |
2426 | 2445 | /// Set current database name before loading tables and databases because
|
2427 | 2446 | /// system logs may copy global context.
|
2428 | 2447 | std::string default_database = server_settings[ServerSetting::default_database];
|
|
0 commit comments