mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Simlify strange test
This commit is contained in:
parent
0e0b535b25
commit
61014dbde6
@ -14,7 +14,6 @@
|
||||
#include <Common/filesystemHelpers.h>
|
||||
#include <Disks/IO/ThreadPoolRemoteFSReader.h>
|
||||
#include <Common/FileCache.h>
|
||||
#include <Common/logger_useful.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -1114,7 +1113,7 @@ void DiskObjectStorageMetadataHelper::restoreFiles(IObjectStorage * source_objec
|
||||
|
||||
}
|
||||
|
||||
void DiskObjectStorageMetadataHelper::processRestoreFiles(IObjectStorage * source_object_storage, const String & source_path, const std::vector<String> & keys)
|
||||
void DiskObjectStorageMetadataHelper::processRestoreFiles(IObjectStorage * source_object_storage, const String & source_path, const std::vector<String> & keys) const
|
||||
{
|
||||
for (const auto & key : keys)
|
||||
{
|
||||
|
@ -315,7 +315,7 @@ public:
|
||||
void restore(const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix, ContextPtr context);
|
||||
void readRestoreInformation(RestoreInformation & restore_information);
|
||||
void restoreFiles(IObjectStorage * source_object_storage, const RestoreInformation & restore_information);
|
||||
void processRestoreFiles(IObjectStorage * source_object_storage, const String & source_path, const std::vector<String> & keys);
|
||||
void processRestoreFiles(IObjectStorage * source_object_storage, const String & source_path, const std::vector<String> & keys) const;
|
||||
void restoreFileOperations(IObjectStorage * source_object_storage, const RestoreInformation & restore_information);
|
||||
|
||||
std::atomic<UInt64> revision_counter = 0;
|
||||
|
@ -35,7 +35,7 @@ void IObjectStorage::removeFromCache(const std::string & path)
|
||||
}
|
||||
}
|
||||
|
||||
void IObjectStorage::copyObjectToAnotherObjectStorage(const std::string & object_from, const std::string & object_to, IObjectStorage & object_storage_to, std::optional<ObjectAttributes> object_to_attributes)
|
||||
void IObjectStorage::copyObjectToAnotherObjectStorage(const std::string & object_from, const std::string & object_to, IObjectStorage & object_storage_to, std::optional<ObjectAttributes> object_to_attributes) // NOLINT
|
||||
{
|
||||
if (&object_storage_to == this)
|
||||
copyObject(object_from, object_to, object_to_attributes);
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include <Disks/IO/ReadBufferFromRemoteFSGather.h>
|
||||
#include <Disks/RemoteDisksCommon.h>
|
||||
#include <Disks/IO/ReadBufferFromRemoteFSGather.h>
|
||||
#include <Disks/IO/AsynchronousReadIndirectBufferFromRemoteFS.h>
|
||||
#include <Disks/IO/ReadIndirectBufferFromRemoteFS.h>
|
||||
#include <Disks/IO/WriteIndirectBufferFromRemoteFS.h>
|
||||
@ -287,7 +286,7 @@ ObjectMetadata S3ObjectStorage::getObjectMetadata(const std::string & path) cons
|
||||
return result;
|
||||
}
|
||||
|
||||
void S3ObjectStorage::copyObjectToAnotherObjectStorage(const std::string & object_from, const std::string & object_to, IObjectStorage & object_storage_to, std::optional<ObjectAttributes> object_to_attributes)
|
||||
void S3ObjectStorage::copyObjectToAnotherObjectStorage(const std::string & object_from, const std::string & object_to, IObjectStorage & object_storage_to, std::optional<ObjectAttributes> object_to_attributes) // NOLINT
|
||||
{
|
||||
/// Shortcut for S3
|
||||
if (auto * dest_s3 = dynamic_cast<S3ObjectStorage * >(&object_storage_to); dest_s3 != nullptr)
|
||||
@ -399,7 +398,7 @@ void S3ObjectStorage::copyObjectMultipartImpl(const String & src_bucket, const S
|
||||
}
|
||||
}
|
||||
|
||||
void S3ObjectStorage::copyObject(const std::string & object_from, const std::string & object_to, std::optional<ObjectAttributes> object_to_attributes)
|
||||
void S3ObjectStorage::copyObject(const std::string & object_from, const std::string & object_to, std::optional<ObjectAttributes> object_to_attributes) // NOLINT
|
||||
{
|
||||
auto head = requestObjectHeadData(bucket, object_from).GetResult();
|
||||
if (head.GetContentLength() >= static_cast<int64_t>(5UL * 1024 * 1024 * 1024))
|
||||
|
@ -88,6 +88,8 @@ def generate_values(date_str, count, sign=1):
|
||||
def create_table(
|
||||
node, table_name, attach=False, replicated=False, db_atomic=False, uuid=""
|
||||
):
|
||||
node.query("DROP DATABASE IF EXISTS s3")
|
||||
|
||||
node.query(
|
||||
"CREATE DATABASE IF NOT EXISTS s3 ENGINE = {engine}".format(
|
||||
engine="Atomic" if db_atomic else "Ordinary"
|
||||
@ -501,8 +503,8 @@ def test_restore_mutations(cluster, db_atomic):
|
||||
) == "({})".format(4096)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("db_atomic", [False, True])
|
||||
def test_migrate_to_restorable_schema(cluster, db_atomic):
|
||||
def test_migrate_to_restorable_schema(cluster):
|
||||
db_atomic = True
|
||||
node = cluster.instances["node_not_restorable"]
|
||||
|
||||
create_table(node, "test", db_atomic=db_atomic)
|
||||
@ -556,7 +558,6 @@ def test_migrate_to_restorable_schema(cluster, db_atomic):
|
||||
"SELECT sum(id) FROM s3.test FORMAT Values"
|
||||
) == "({})".format(0)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("replicated", [False, True])
|
||||
@pytest.mark.parametrize("db_atomic", [False, True])
|
||||
def test_restore_to_detached(cluster, replicated, db_atomic):
|
||||
|
Loading…
Reference in New Issue
Block a user