mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Less code
This commit is contained in:
parent
3afd0c4ab6
commit
b7c0d25528
@ -17,7 +17,6 @@ public:
|
|||||||
|
|
||||||
void commit() override
|
void commit() override
|
||||||
{
|
{
|
||||||
commit_called = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void createDirectory(const std::string & path) override
|
void createDirectory(const std::string & path) override
|
||||||
@ -125,14 +124,8 @@ public:
|
|||||||
disk.createHardLink(src_path, dst_path);
|
disk.createHardLink(src_path, dst_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isCommitedOrTriedToCommit() const override
|
|
||||||
{
|
|
||||||
return commit_called;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
IDisk & disk;
|
IDisk & disk;
|
||||||
bool commit_called{false};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -108,8 +108,6 @@ public:
|
|||||||
|
|
||||||
/// Create hardlink from `src_path` to `dst_path`.
|
/// Create hardlink from `src_path` to `dst_path`.
|
||||||
virtual void createHardLink(const std::string & src_path, const std::string & dst_path) = 0;
|
virtual void createHardLink(const std::string & src_path, const std::string & dst_path) = 0;
|
||||||
|
|
||||||
virtual bool isCommitedOrTriedToCommit() const = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using DiskTransactionPtr = std::shared_ptr<IDiskTransaction>;
|
using DiskTransactionPtr = std::shared_ptr<IDiskTransaction>;
|
||||||
|
@ -602,7 +602,6 @@ void DiskObjectStorageTransaction::copyFile(const std::string & from_file_path,
|
|||||||
|
|
||||||
void DiskObjectStorageTransaction::commit()
|
void DiskObjectStorageTransaction::commit()
|
||||||
{
|
{
|
||||||
commit_called = true;
|
|
||||||
for (size_t i = 0; i < operations_to_execute.size(); ++i)
|
for (size_t i = 0; i < operations_to_execute.size(); ++i)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -58,7 +58,6 @@ private:
|
|||||||
DiskObjectStorageRemoteMetadataRestoreHelper * metadata_helper;
|
DiskObjectStorageRemoteMetadataRestoreHelper * metadata_helper;
|
||||||
|
|
||||||
DiskObjectStorageOperations operations_to_execute;
|
DiskObjectStorageOperations operations_to_execute;
|
||||||
bool commit_called{false};
|
|
||||||
public:
|
public:
|
||||||
DiskObjectStorageTransaction(
|
DiskObjectStorageTransaction(
|
||||||
IObjectStorage & object_storage_,
|
IObjectStorage & object_storage_,
|
||||||
@ -108,11 +107,6 @@ public:
|
|||||||
void setLastModified(const std::string & path, const Poco::Timestamp & timestamp) override;
|
void setLastModified(const std::string & path, const Poco::Timestamp & timestamp) override;
|
||||||
void setReadOnly(const std::string & path) override;
|
void setReadOnly(const std::string & path) override;
|
||||||
void createHardLink(const std::string & src_path, const std::string & dst_path) override;
|
void createHardLink(const std::string & src_path, const std::string & dst_path) override;
|
||||||
|
|
||||||
bool isCommitedOrTriedToCommit() const override
|
|
||||||
{
|
|
||||||
return commit_called;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using DiskObjectStorageTransactionPtr = std::shared_ptr<DiskObjectStorageTransaction>;
|
using DiskObjectStorageTransactionPtr = std::shared_ptr<DiskObjectStorageTransaction>;
|
||||||
|
Loading…
Reference in New Issue
Block a user