Fix order of arguments

This commit is contained in:
alesapin 2022-09-27 15:50:25 +02:00
parent 695133cc5b
commit a20a9242a1
7 changed files with 15 additions and 14 deletions

View File

@ -732,13 +732,14 @@ DataPartStoragePtr DataPartStorageOnDisk::freeze(
const std::string & dir_path,
bool make_source_readonly,
std::function<void(const DiskPtr &)> save_metadata_callback,
const NameSet & files_to_copy_instead_of_hardlinks,
bool copy_instead_of_hardlink) const
bool copy_instead_of_hardlink,
const NameSet & files_to_copy_instead_of_hardlinks) const
{
auto disk = volume->getDisk();
disk->createDirectories(to);
localBackup(disk, getRelativePath(), fs::path(to) / dir_path, make_source_readonly, {}, files_to_copy_instead_of_hardlinks, copy_instead_of_hardlink);
localBackup(disk, getRelativePath(), fs::path(to) / dir_path, make_source_readonly, {}, copy_instead_of_hardlink, files_to_copy_instead_of_hardlinks);
if (save_metadata_callback)
save_metadata_callback(disk);

View File

@ -100,8 +100,8 @@ public:
const std::string & dir_path,
bool make_source_readonly,
std::function<void(const DiskPtr &)> save_metadata_callback,
const NameSet & files_to_copy_instead_of_hardlinks,
bool copy_instead_of_hardlink) const override;
bool copy_instead_of_hardlink,
const NameSet & files_to_copy_instead_of_hardlinks) const override;
DataPartStoragePtr clone(
const std::string & to,

View File

@ -197,8 +197,8 @@ public:
const std::string & dir_path,
bool make_source_readonly,
std::function<void(const DiskPtr &)> save_metadata_callback,
const NameSet & files_to_copy_instead_of_hardlinks,
bool copy_instead_of_hardlink) const = 0;
bool copy_instead_of_hardlink,
const NameSet & files_to_copy_instead_of_hardlinks) const = 0;
/// Make a full copy of a data part into 'to/dir_path' (possibly to a different disk).
virtual std::shared_ptr<IDataPartStorage> clone(

View File

@ -1523,8 +1523,8 @@ void IMergeTreeDataPart::makeCloneInDetached(const String & prefix, const Storag
getRelativePathForDetachedPart(prefix),
/*make_source_readonly*/ true,
{},
{},
copy_instead_of_hardlink);
copy_instead_of_hardlink,
{});
}
DataPartStoragePtr IMergeTreeDataPart::makeCloneOnDisk(const DiskPtr & disk, const String & directory_name) const

View File

@ -6205,7 +6205,7 @@ std::pair<MergeTreeData::MutableDataPartPtr, scope_guard> MergeTreeData::cloneAn
std::string(fs::path(src_part_storage->getFullRootPath()) / tmp_dst_part_name),
with_copy);
auto dst_part_storage = src_part_storage->freeze(relative_data_path, tmp_dst_part_name, /* make_source_readonly */ false, {}, files_to_copy_instead_of_hardlinks, copy_instead_of_hardlink);
auto dst_part_storage = src_part_storage->freeze(relative_data_path, tmp_dst_part_name, /* make_source_readonly */ false, {}, copy_instead_of_hardlink, files_to_copy_instead_of_hardlinks);
auto dst_data_part = createPart(dst_part_name, dst_part_info, dst_part_storage);
@ -6393,8 +6393,8 @@ PartitionCommandsResultInfo MergeTreeData::freezePartitionsByMatcher(
part->data_part_storage->getPartDirectory(),
/*make_source_readonly*/ true,
callback,
{},
/*copy_instead_of_hardlink*/ false);
/*copy_instead_of_hardlink*/ false,
{});
part->is_frozen.store(true, std::memory_order_relaxed);
result.push_back(PartitionCommandResultInfo{

View File

@ -89,7 +89,7 @@ private:
void localBackup(
const DiskPtr & disk, const String & source_path,
const String & destination_path, bool make_source_readonly,
std::optional<size_t> max_level, const NameSet & files_to_copy_intead_of_hardlinks, bool copy_instead_of_hardlinks)
std::optional<size_t> max_level, bool copy_instead_of_hardlinks, const NameSet & files_to_copy_intead_of_hardlinks)
{
if (disk->exists(destination_path) && !disk->isDirectoryEmpty(destination_path))
{

View File

@ -20,6 +20,6 @@ namespace DB
* If max_level is specified, than only files which depth relative source_path less or equal max_level will be copied.
* So, if max_level=0 than only direct file child are copied.
*/
void localBackup(const DiskPtr & disk, const String & source_path, const String & destination_path, bool make_source_readonly = true, std::optional<size_t> max_level = {}, const NameSet & files_to_copy_intead_of_hardlinks = {}, bool copy_instead_of_hardlinks = false);
void localBackup(const DiskPtr & disk, const String & source_path, const String & destination_path, bool make_source_readonly = true, std::optional<size_t> max_level = {}, bool copy_instead_of_hardlinks = false, const NameSet & files_to_copy_intead_of_hardlinks = {});
}