Fix clang-tidy issues and disable parallel execution of tests

This commit is contained in:
Aleksei Filatov 2023-11-16 19:44:24 +03:00
parent 21a17f8334
commit 163b8a814e
12 changed files with 20 additions and 13 deletions

View File

@ -57,7 +57,7 @@ public:
String relative_path_from = validatePathAndGetAsRelative(path_from);
String relative_path_to = validatePathAndGetAsRelative(path_to);
disk_from->copyDirectoryContent(relative_path_from, disk_to, relative_path_to, /* read_settings= */ {}, /* write_settings= */ {});
disk_from->copyDirectoryContent(relative_path_from, disk_to, relative_path_to, /* read_settings= */ {}, /* write_settings= */ {}, /* cancellation_hook= */ {});
}
};
}

View File

@ -353,7 +353,7 @@ void DiskEncrypted::copyDirectoryContent(
}
/// Copy the file through buffers with deciphering.
IDisk::copyDirectoryContent(from_dir, to_disk, to_dir, read_settings, write_settings);
IDisk::copyDirectoryContent(from_dir, to_disk, to_dir, read_settings, write_settings, cancellation_hook);
}
std::unique_ptr<ReadBufferFromFileBase> DiskEncrypted::readFile(

View File

@ -118,7 +118,7 @@ public:
const String & to_dir,
const ReadSettings & read_settings,
const WriteSettings & write_settings,
const std::function<void()> & cancellation_hook = {}) override;
const std::function<void()> & cancellation_hook) override;
std::unique_ptr<ReadBufferFromFileBase> readFile(
const String & path,

View File

@ -71,7 +71,7 @@ public:
const String & to_dir,
const ReadSettings & read_settings,
const WriteSettings & write_settings,
const std::function<void()> & cancellation_hook = {}) override;
const std::function<void()> & cancellation_hook) override;
void listFiles(const String & path, std::vector<String> & file_names) const override;

View File

@ -24,7 +24,7 @@ bool IDisk::isDirectoryEmpty(const String & path) const
return !iterateDirectory(path)->isValid();
}
void IDisk::copyFile(
void IDisk::copyFile( /// NOLINT
const String & from_file_path,
IDisk & to_disk,
const String & to_file_path,
@ -160,7 +160,7 @@ void IDisk::copyThroughBuffers(
for (auto & result : results)
result.wait();
for (auto & result : results)
result.get(); /// May rethrow an exception
result.get(); /// May rethrow an exception
}

View File

@ -199,7 +199,7 @@ public:
const String & to_dir,
const ReadSettings & read_settings,
const WriteSettings & write_settings,
const std::function<void()> & cancellation_hook = {});
const std::function<void()> & cancellation_hook);
/// Copy file `from_file_path` to `to_file_path` located at `to_disk`.
virtual void copyFile( /// NOLINT

View File

@ -75,7 +75,7 @@ public:
const ReadSettings & read_settings,
const WriteSettings & write_settings,
Poco::Logger * log,
const std::function<void()> & cancellation_hook = {}
const std::function<void()> & cancellation_hook
) const override;
void rename(

View File

@ -263,7 +263,7 @@ public:
const ReadSettings & read_settings,
const WriteSettings & write_settings,
Poco::Logger * log,
const std::function<void()> & cancellation_hook = {}
const std::function<void()> & cancellation_hook
) const = 0;
/// Change part's root. from_root should be a prefix path of current root path.

View File

@ -385,7 +385,7 @@ public:
const String & directory_name,
const ReadSettings & read_settings,
const WriteSettings & write_settings,
const std::function<void()> & cancellation_hook = {}) const;
const std::function<void()> & cancellation_hook) const;
/// Checks that .bin and .mrk files exist.
///

View File

@ -170,7 +170,7 @@ void localBackup(
else if (copy_instead_of_hardlinks)
{
CleanupOnFail cleanup([disk, destination_path]() { disk->removeRecursive(destination_path); });
disk->copyDirectoryContent(source_path, disk, destination_path, read_settings, write_settings);
disk->copyDirectoryContent(source_path, disk, destination_path, read_settings, write_settings, /*cancellation_hook=*/{});
cleanup.success();
}
else

View File

@ -92,5 +92,9 @@
"test_profile_max_sessions_for_user/test.py::test_profile_max_sessions_for_user_grpc",
"test_profile_max_sessions_for_user/test.py::test_profile_max_sessions_for_user_tcp_and_others",
"test_profile_max_sessions_for_user/test.py::test_profile_max_sessions_for_user_setting_in_query",
"test_profile_max_sessions_for_user/test.py::test_profile_max_sessions_for_user_client_suggestions_load"
"test_profile_max_sessions_for_user/test.py::test_profile_max_sessions_for_user_client_suggestions_load",
"test_ttl_move/test.py::TestCancelBackgroundMoving::test_cancel_background_moving_on_stop_moves_query",
"test_ttl_move/test.py::TestCancelBackgroundMoving::test_cancel_background_moving_on_table_detach",
"test_ttl_move/test.py::TestCancelBackgroundMoving::test_cancel_background_moving_on_zookeeper_disconnect"
]

View File

@ -1925,5 +1925,8 @@ class TestCancelBackgroundMoving:
pm.drop_instance_zk_connections(node1)
# Wait for background moving task to be cancelled
assert_logs_contain_with_retry(
node1, "MergeTreeBackgroundExecutor.*Cancelled moving parts"
node1,
"MergeTreeBackgroundExecutor.*Cancelled moving parts",
retry_count=30,
sleep_time=1,
)