Fix flaky test. Fix clang-tidy warning

This commit is contained in:
Aleksei Filatov 2024-03-05 09:53:30 +03:00
parent fbdc5e3053
commit 758a75c1b4
4 changed files with 7 additions and 13 deletions

View File

@ -321,11 +321,10 @@ public:
};
virtual void getRemotePathsRecursive(
const String &,
std::vector<LocalPathWithObjectStoragePaths> &,
const std::function<bool(const String &)> & /* skip_predicate */ = {})
const String &, std::vector<LocalPathWithObjectStoragePaths> &, const std::function<bool(const String &)> & /* skip_predicate */)
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
throw Exception(
ErrorCodes::NOT_IMPLEMENTED,
"Method `getRemotePathsRecursive() not implemented for disk: {}`",
getDataSourceDescription().toString());
}

View File

@ -51,7 +51,7 @@ public:
void getRemotePathsRecursive(
const String & local_path,
std::vector<LocalPathWithObjectStoragePaths> & paths_map,
const std::function<bool(const String &)> & skip_predicate = {}) override;
const std::function<bool(const String &)> & skip_predicate) override;
const std::string & getCacheName() const override { return object_storage->getCacheName(); }

View File

@ -58,8 +58,8 @@ Pipe StorageSystemRemoteDataPaths::read(
if (disk->isRemote())
{
std::vector<IDisk::LocalPathWithObjectStoragePaths> remote_paths_by_local_path;
disk->getRemotePathsRecursive("store", remote_paths_by_local_path);
disk->getRemotePathsRecursive("data", remote_paths_by_local_path);
disk->getRemotePathsRecursive("store", remote_paths_by_local_path, /* skip_predicate = */ {});
disk->getRemotePathsRecursive("data", remote_paths_by_local_path, /* skip_predicate = */ {});
if (context->getSettingsRef().traverse_shadow_remote_data_paths)
disk->getRemotePathsRecursive(
"shadow",

View File

@ -26,9 +26,4 @@ ${CLICKHOUSE_CLIENT} --query "
FROM system.remote_data_paths
WHERE disk_name = 's3_cache' AND local_path LIKE '%shadow/${BACKUP}%'
SETTINGS traverse_shadow_remote_data_paths=1;"
${CLICKHOUSE_CLIENT} --query "SYSTEM UNFREEZE WITH NAME '${BACKUP}';" &>/dev/null || true
${CLICKHOUSE_CLIENT} --query "
SELECT count() == 0
FROM system.remote_data_paths
WHERE disk_name = 's3_cache' AND local_path LIKE '%shadow/${BACKUP}%'
SETTINGS traverse_shadow_remote_data_paths=1;"
${CLICKHOUSE_CLIENT} --query "SYSTEM UNFREEZE WITH NAME '${BACKUP}';" &>/dev/null