mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
add test, add comment
This commit is contained in:
parent
80aa8863e5
commit
79a03432bf
@ -192,7 +192,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// This wrapper helps to avoid too noisy log messages from similar objects.
|
/// This wrapper helps to avoid too noisy log messages from similar objects.
|
||||||
/// For the value logger_name it remembers when such a message was logged the last time.
|
/// Once an instance of LogSeriesLimiter type is created the decision is done
|
||||||
|
/// All followed message which use this instance is either printed or muted all together.
|
||||||
|
/// LogSeriesLimiter differs from LogFrequencyLimiterIml in a way that
|
||||||
|
/// LogSeriesLimiter is useful for accept or mute series of logs when LogFrequencyLimiterIml works for each line independently.
|
||||||
class LogSeriesLimiter
|
class LogSeriesLimiter
|
||||||
{
|
{
|
||||||
static std::mutex mutex;
|
static std::mutex mutex;
|
||||||
|
@ -417,6 +417,8 @@ private:
|
|||||||
{
|
{
|
||||||
SentryWriter::onFault(sig, error_message, stack_trace);
|
SentryWriter::onFault(sig, error_message, stack_trace);
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunreachable-code"
|
||||||
/// Advice the user to send it manually.
|
/// Advice the user to send it manually.
|
||||||
if constexpr (std::string_view(VERSION_OFFICIAL).contains("official build"))
|
if constexpr (std::string_view(VERSION_OFFICIAL).contains("official build"))
|
||||||
{
|
{
|
||||||
|
@ -1119,4 +1119,32 @@ TEST_P(SyncAsync, IncreaseLimited) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(SyncAsync, StrictUploadPartSize) {
|
||||||
|
getSettings().s3_check_objects_after_upload = false;
|
||||||
|
|
||||||
|
{
|
||||||
|
getSettings().s3_max_single_part_upload_size = 10;
|
||||||
|
getSettings().s3_strict_upload_part_size = 11;
|
||||||
|
|
||||||
|
{
|
||||||
|
auto counters = MockS3::EventCounts{.multiUploadCreate = 1, .multiUploadComplete = 1, .uploadParts = 6};
|
||||||
|
runSimpleScenario(counters, 66);
|
||||||
|
|
||||||
|
auto actual_parts_sizes = MockS3::BucketMemStore::GetPartSizes(getCompletedPartUploads().back().second);
|
||||||
|
ASSERT_THAT(actual_parts_sizes, testing::ElementsAre(11, 11, 11, 11, 11, 11));
|
||||||
|
|
||||||
|
// parts: 11 22 33 44 55 66
|
||||||
|
// size: 11 11 11 11 11 11
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
auto counters = MockS3::EventCounts{.multiUploadCreate = 1, .multiUploadComplete = 1, .uploadParts = 7};
|
||||||
|
runSimpleScenario(counters, 67);
|
||||||
|
|
||||||
|
auto actual_parts_sizes = MockS3::BucketMemStore::GetPartSizes(getCompletedPartUploads().back().second);
|
||||||
|
ASSERT_THAT(actual_parts_sizes, testing::ElementsAre(11, 11, 11, 11, 11, 11, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user