diff --git a/src/Disks/BlobStorage/DiskBlobStorage.h b/src/Disks/BlobStorage/DiskBlobStorage.h index eea4ced0ded..8762e77a256 100644 --- a/src/Disks/BlobStorage/DiskBlobStorage.h +++ b/src/Disks/BlobStorage/DiskBlobStorage.h @@ -28,7 +28,7 @@ struct DiskBlobStorageSettings final int thread_pool_size_, int objects_chunk_size_to_delete_); - UInt64 max_single_part_upload_size; + size_t max_single_part_upload_size; UInt64 min_bytes_for_seek; int thread_pool_size; int objects_chunk_size_to_delete; diff --git a/src/Disks/BlobStorage/registerDiskBlobStorage.cpp b/src/Disks/BlobStorage/registerDiskBlobStorage.cpp index 1ef94a6084e..4fa63014a12 100644 --- a/src/Disks/BlobStorage/registerDiskBlobStorage.cpp +++ b/src/Disks/BlobStorage/registerDiskBlobStorage.cpp @@ -139,7 +139,6 @@ void registerDiskBlobStorage(DiskFactory & factory) String cache_path = config.getString(config_prefix + ".cache_path", context->getPath() + "disks/" + name + "/cache/"); if (metadata_path == cache_path) - // TODO maybe provide the cache_path in the error message too. throw Exception("Metadata and cache path should be different: " + metadata_path, ErrorCodes::BAD_ARGUMENTS); auto cache_disk = std::make_shared("blob-storage-cache", cache_path, 0); diff --git a/src/IO/ReadBufferFromBlobStorage.cpp b/src/IO/ReadBufferFromBlobStorage.cpp index 97d3ac77109..cb648272519 100644 --- a/src/IO/ReadBufferFromBlobStorage.cpp +++ b/src/IO/ReadBufferFromBlobStorage.cpp @@ -94,7 +94,7 @@ off_t ReadBufferFromBlobStorage::seek(off_t offset_, int whence) off_t ReadBufferFromBlobStorage::getPosition() { - // TODO: which one is the right one? In S3: return offset - available(); + // TODO: why is it `return offset - available()` in S3? return offset; } @@ -118,15 +118,13 @@ void ReadBufferFromBlobStorage::initialize() } catch (const Azure::Storage::StorageException & e) { - // TODO log the download options to - LOG_INFO(log, "Exception caught during Azure Download for file {} : {}", path, e.Message); + LOG_INFO(log, "Exception caught during Azure Download for file {} at offset {} : {}", path, offset, e.Message); throw e; } if (data_stream == nullptr) - // TODO log the download options and the context - throw Exception("Null data stream obtained while downloading a file from Blob Storage", ErrorCodes::RECEIVED_EMPTY_DATA); + throw Exception(ErrorCodes::RECEIVED_EMPTY_DATA, "Null data stream obtained while downloading file {} from Blob Storage", path); total_size = data_stream->Length() + offset; diff --git a/src/IO/WriteBufferFromBlobStorage.cpp b/src/IO/WriteBufferFromBlobStorage.cpp index dc7475cf56f..81e992df650 100644 --- a/src/IO/WriteBufferFromBlobStorage.cpp +++ b/src/IO/WriteBufferFromBlobStorage.cpp @@ -37,7 +37,6 @@ void WriteBufferFromBlobStorage::nextImpl() if (!offset()) return; - auto pos = working_buffer.begin(); auto * pos = working_buffer.begin(); auto len = offset(); auto block_blob_client = blob_container_client->GetBlockBlobClient(blob_path); diff --git a/src/IO/WriteBufferFromBlobStorage.h b/src/IO/WriteBufferFromBlobStorage.h index 3a7d0679a40..9c5bb613f38 100644 --- a/src/IO/WriteBufferFromBlobStorage.h +++ b/src/IO/WriteBufferFromBlobStorage.h @@ -24,7 +24,7 @@ public: explicit WriteBufferFromBlobStorage( std::shared_ptr blob_container_client_, const String & blob_path_, - UInt64 max_single_part_upload_size_, + size_t max_single_part_upload_size_, size_t buf_size_); void nextImpl() override; @@ -35,7 +35,6 @@ private: std::vector block_ids; std::shared_ptr blob_container_client; - UInt64 max_single_part_upload_size; size_t max_single_part_upload_size; const String blob_path; bool finalized = false;