From fd92c1961e5f09411d83b21c4fe9f00b78be22ba Mon Sep 17 00:00:00 2001 From: Smita Kulkarni Date: Sun, 7 Jan 2024 16:33:48 +0100 Subject: [PATCH] Fix clang tidy build --- src/Backups/BackupIO_AzureBlobStorage.cpp | 12 ++++++------ src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp | 10 +++++----- src/IO/AzureBlobStorage/copyAzureBlobStorageFile.h | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Backups/BackupIO_AzureBlobStorage.cpp b/src/Backups/BackupIO_AzureBlobStorage.cpp index 5ddbb42e2c0..8c6c1040eec 100644 --- a/src/Backups/BackupIO_AzureBlobStorage.cpp +++ b/src/Backups/BackupIO_AzureBlobStorage.cpp @@ -305,21 +305,21 @@ void BackupWriterAzureBlobStorage::removeFile(const String & file_name) object_storage->removeObjectIfExists(object); } -void BackupWriterAzureBlobStorage::removeFiles(const Strings & keys) +void BackupWriterAzureBlobStorage::removeFiles(const Strings & file_names) { StoredObjects objects; - for (const auto & key : keys) - objects.emplace_back(key); + for (const auto & file_name : file_names) + objects.emplace_back(file_name); object_storage->removeObjectsIfExist(objects); } -void BackupWriterAzureBlobStorage::removeFilesBatch(const Strings & keys) +void BackupWriterAzureBlobStorage::removeFilesBatch(const Strings & file_names) { StoredObjects objects; - for (const auto & key : keys) - objects.emplace_back(key); + for (const auto & file_name : file_names) + objects.emplace_back(file_name); object_storage->removeObjectsIfExist(objects); } diff --git a/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp b/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp index 3399f1705f4..272be914cc1 100644 --- a/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp +++ b/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.cpp @@ -65,11 +65,11 @@ namespace , schedule(schedule_) , for_disk_azure_blob_storage(for_disk_azure_blob_storage_) , log(log_) - , max_single_part_upload_size(settings_.get()->max_single_part_upload_size) + , max_single_part_upload_size(settings_->max_single_part_upload_size) { } - ~UploadHelper() {} + virtual ~UploadHelper() = default; protected: std::function()> create_read_buffer; @@ -114,9 +114,9 @@ namespace if (!total_size) throw Exception(ErrorCodes::LOGICAL_ERROR, "Chosen multipart upload for an empty file. This must not happen"); - auto max_part_number = settings.get()->max_part_number; - auto min_upload_part_size = settings.get()->min_upload_part_size; - auto max_upload_part_size = settings.get()->max_upload_part_size; + auto max_part_number = settings->max_part_number; + auto min_upload_part_size = settings->min_upload_part_size; + auto max_upload_part_size = settings->max_upload_part_size; if (!max_part_number) throw Exception(ErrorCodes::INVALID_CONFIG_PARAMETER, "max_part_number must not be 0"); diff --git a/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.h b/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.h index a6502541db1..b022151d32d 100644 --- a/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.h +++ b/src/IO/AzureBlobStorage/copyAzureBlobStorageFile.h @@ -24,11 +24,11 @@ void copyAzureBlobStorageFile( MultiVersion & src_client, MultiVersion & dest_client, const String & src_container, - const String & src_path, + const String & src_blob, size_t src_offset, size_t src_size, const String & dest_container, - const String & dest_path, + const String & dest_blob, std::shared_ptr settings, const ReadSettings & read_settings, const std::optional> & object_metadata = std::nullopt, @@ -47,7 +47,7 @@ void copyDataToAzureBlobStorageFile( size_t size, MultiVersion & client, const String & dest_container, - const String & dest_bucket, + const String & dest_blob, std::shared_ptr settings, const std::optional> & object_metadata = std::nullopt, ThreadPoolCallbackRunner schedule_ = {},