Less code

This commit is contained in:
alesapin 2022-06-30 23:01:55 +02:00
parent 3afd0c4ab6
commit b7c0d25528
4 changed files with 0 additions and 16 deletions

View File

@ -17,7 +17,6 @@ public:
void commit() override
{
commit_called = true;
}
void createDirectory(const std::string & path) override
@ -125,14 +124,8 @@ public:
disk.createHardLink(src_path, dst_path);
}
bool isCommitedOrTriedToCommit() const override
{
return commit_called;
}
private:
IDisk & disk;
bool commit_called{false};
};
}

View File

@ -108,8 +108,6 @@ public:
/// Create hardlink from `src_path` to `dst_path`.
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>;

View File

@ -602,7 +602,6 @@ void DiskObjectStorageTransaction::copyFile(const std::string & from_file_path,
void DiskObjectStorageTransaction::commit()
{
commit_called = true;
for (size_t i = 0; i < operations_to_execute.size(); ++i)
{
try

View File

@ -58,7 +58,6 @@ private:
DiskObjectStorageRemoteMetadataRestoreHelper * metadata_helper;
DiskObjectStorageOperations operations_to_execute;
bool commit_called{false};
public:
DiskObjectStorageTransaction(
IObjectStorage & object_storage_,
@ -108,11 +107,6 @@ public:
void setLastModified(const std::string & path, const Poco::Timestamp & timestamp) override;
void setReadOnly(const std::string & 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>;