Style check fixes

This commit is contained in:
alesapin 2022-05-14 13:46:47 +02:00
parent cc304a3178
commit 4540cf8925
6 changed files with 35 additions and 35 deletions

View File

@ -29,7 +29,8 @@ namespace ErrorCodes
extern const int FILE_DOESNT_EXIST; extern const int FILE_DOESNT_EXIST;
extern const int BAD_FILE_TYPE; extern const int BAD_FILE_TYPE;
extern const int MEMORY_LIMIT_EXCEEDED; extern const int MEMORY_LIMIT_EXCEEDED;
extern const int SUPPORT_IS_DISABLED; extern const int BAD_ARGUMENTS;
extern const int LOGICAL_ERROR;
} }
static String revisionToString(UInt64 revision) static String revisionToString(UInt64 revision)

View File

@ -290,7 +290,7 @@ public:
virtual bool isReadOnly() const { return false; } virtual bool isReadOnly() const { return false; }
/// Check if disk is broken. Broken disks will have 0 space and connot be used. /// Check if disk is broken. Broken disks will have 0 space and cannot be used.
virtual bool isBroken() const { return false; } virtual bool isBroken() const { return false; }
/// Invoked when Global Context is shutdown. /// Invoked when Global Context is shutdown.

View File

@ -5,6 +5,11 @@
namespace DB namespace DB
{ {
namespace ErrorCodes
{
extern const int BAD_ARGUMENTS;
}
std::unique_ptr<S3ObjectStorageSettings> getSettings(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, ContextPtr context) std::unique_ptr<S3ObjectStorageSettings> getSettings(const Poco::Util::AbstractConfiguration & config, const String & config_prefix, ContextPtr context)
{ {
S3Settings::ReadWriteSettings rw_settings; S3Settings::ReadWriteSettings rw_settings;

View File

@ -35,10 +35,6 @@ namespace DB
namespace ErrorCodes namespace ErrorCodes
{ {
extern const int S3_ERROR; extern const int S3_ERROR;
extern const int FILE_ALREADY_EXISTS;
extern const int UNKNOWN_FORMAT;
extern const int BAD_ARGUMENTS;
extern const int LOGICAL_ERROR;
} }
namespace namespace
@ -82,14 +78,10 @@ bool S3ObjectStorage::exists(const std::string & path) const
if (!object_head.IsSuccess()) if (!object_head.IsSuccess())
{ {
if (object_head.GetError().GetErrorType() == Aws::S3::S3Errors::RESOURCE_NOT_FOUND) if (object_head.GetError().GetErrorType() == Aws::S3::S3Errors::RESOURCE_NOT_FOUND)
{
LOG_DEBUG(&Poco::Logger::get("DEBUG"), "OBJECT DOESNT {} EXISTS", path);
return false; return false;
}
throwIfError(object_head); throwIfError(object_head);
} }
LOG_DEBUG(&Poco::Logger::get("DEBUG"), "OBJECT {} EXISTS", path);
return true; return true;
} }

View File

@ -229,7 +229,9 @@ def test_insert_same_partition_and_merge(cluster, merge_vertical, node_name):
assert ( assert (
node.query("SELECT count(distinct(id)) FROM s3_test FORMAT Values") == "(8192)" node.query("SELECT count(distinct(id)) FROM s3_test FORMAT Values") == "(8192)"
) )
wait_for_delete_s3_objects(cluster, FILES_OVERHEAD_PER_PART_WIDE + FILES_OVERHEAD, timeout=45) wait_for_delete_s3_objects(
cluster, FILES_OVERHEAD_PER_PART_WIDE + FILES_OVERHEAD, timeout=45
)
@pytest.mark.parametrize("node_name", ["node"]) @pytest.mark.parametrize("node_name", ["node"])