mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 05:22:17 +00:00
Backport #72400 to 24.9: make operations_to_execute as shared ptr
This commit is contained in:
parent
4f3ddca1dd
commit
4fafb9dfa1
@ -782,9 +782,9 @@ std::unique_ptr<WriteBufferFromFileBase> DiskObjectStorageTransaction::writeFile
|
||||
}
|
||||
else
|
||||
{
|
||||
auto write_operation = std::make_unique<WriteFileObjectStorageOperation>(object_storage, metadata_storage, object);
|
||||
auto write_operation = std::make_shared<WriteFileObjectStorageOperation>(object_storage, metadata_storage, object);
|
||||
|
||||
create_metadata_callback = [object_storage_tx = shared_from_this(), write_op = write_operation.get(), mode, path, key_ = std::move(object_key)](size_t count)
|
||||
create_metadata_callback = [object_storage_tx = shared_from_this(), write_op = write_operation, mode, path, key_ = std::move(object_key)](size_t count)
|
||||
{
|
||||
/// This callback called in WriteBuffer finalize method -- only there we actually know
|
||||
/// how many bytes were written. We don't control when this finalize method will be called
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <Disks/IDiskTransaction.h>
|
||||
#include <Disks/ObjectStorages/DiskObjectStorage.h>
|
||||
#include <Disks/ObjectStorages/IMetadataStorage.h>
|
||||
@ -34,7 +35,7 @@ public:
|
||||
virtual std::string getInfoForLog() const = 0;
|
||||
};
|
||||
|
||||
using DiskObjectStorageOperation = std::unique_ptr<IDiskObjectStorageOperation>;
|
||||
using DiskObjectStorageOperation = std::shared_ptr<IDiskObjectStorageOperation>;
|
||||
|
||||
using DiskObjectStorageOperations = std::vector<DiskObjectStorageOperation>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user