mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
fix
This commit is contained in:
parent
3fb82ccd58
commit
ae795d87b2
@ -234,6 +234,7 @@ function run_tests
|
|||||||
--check-zookeeper-session
|
--check-zookeeper-session
|
||||||
--order random
|
--order random
|
||||||
--print-time
|
--print-time
|
||||||
|
--report-logs-stats
|
||||||
--jobs "${NPROC}"
|
--jobs "${NPROC}"
|
||||||
)
|
)
|
||||||
time clickhouse-test "${test_opts[@]}" -- "$FASTTEST_FOCUS" 2>&1 \
|
time clickhouse-test "${test_opts[@]}" -- "$FASTTEST_FOCUS" 2>&1 \
|
||||||
|
@ -171,9 +171,8 @@ TEST(Common, RWLockDeadlock)
|
|||||||
auto holder2 = lock2->getLock(RWLockImpl::Read, "q1", std::chrono::milliseconds(100));
|
auto holder2 = lock2->getLock(RWLockImpl::Read, "q1", std::chrono::milliseconds(100));
|
||||||
if (!holder2)
|
if (!holder2)
|
||||||
{
|
{
|
||||||
throw Exception(
|
throw Exception(ErrorCodes::DEADLOCK_AVOIDED,
|
||||||
"Locking attempt timed out! Possible deadlock avoided. Client should retry.",
|
"Locking attempt timed out! Possible deadlock avoided. Client should retry.");
|
||||||
ErrorCodes::DEADLOCK_AVOIDED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const Exception & e)
|
catch (const Exception & e)
|
||||||
@ -202,9 +201,8 @@ TEST(Common, RWLockDeadlock)
|
|||||||
auto holder1 = lock1->getLock(RWLockImpl::Read, "q3", std::chrono::milliseconds(100));
|
auto holder1 = lock1->getLock(RWLockImpl::Read, "q3", std::chrono::milliseconds(100));
|
||||||
if (!holder1)
|
if (!holder1)
|
||||||
{
|
{
|
||||||
throw Exception(
|
throw Exception(ErrorCodes::DEADLOCK_AVOIDED,
|
||||||
"Locking attempt timed out! Possible deadlock avoided. Client should retry.",
|
"Locking attempt timed out! Possible deadlock avoided. Client should retry.");
|
||||||
ErrorCodes::DEADLOCK_AVOIDED);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const Exception & e)
|
catch (const Exception & e)
|
||||||
|
@ -2017,7 +2017,10 @@ def main(args):
|
|||||||
print("All tests have finished.")
|
print("All tests have finished.")
|
||||||
|
|
||||||
if args.report_logs_stats:
|
if args.report_logs_stats:
|
||||||
reportLogStats(args)
|
try:
|
||||||
|
reportLogStats(args)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Failed to get stats about log messages: {e}")
|
||||||
|
|
||||||
if args.report_coverage and not reportCoverage(args):
|
if args.report_coverage and not reportCoverage(args):
|
||||||
exit_code.value = 1
|
exit_code.value = 1
|
||||||
|
@ -74,10 +74,10 @@ protected:
|
|||||||
size_decompressed = unalignedLoad<UInt32>(&own_compressed_buffer[5]);
|
size_decompressed = unalignedLoad<UInt32>(&own_compressed_buffer[5]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw Exception("Unknown compression method: " + toString(method), ErrorCodes::UNKNOWN_COMPRESSION_METHOD);
|
throw Exception(ErrorCodes::UNKNOWN_COMPRESSION_METHOD, "Unknown compression method: {}", toString(method));
|
||||||
|
|
||||||
if (size_compressed > DBMS_MAX_COMPRESSED_SIZE)
|
if (size_compressed > DBMS_MAX_COMPRESSED_SIZE)
|
||||||
throw Exception("Too large size_compressed. Most likely corrupted data.", ErrorCodes::TOO_LARGE_SIZE_COMPRESSED);
|
throw Exception(ErrorCodes::TOO_LARGE_SIZE_COMPRESSED, "Too large size_compressed. Most likely corrupted data.");
|
||||||
|
|
||||||
/// Is whole compressed block located in 'compressed_in' buffer?
|
/// Is whole compressed block located in 'compressed_in' buffer?
|
||||||
if (compressed_in->offset() >= COMPRESSED_BLOCK_HEADER_SIZE &&
|
if (compressed_in->offset() >= COMPRESSED_BLOCK_HEADER_SIZE &&
|
||||||
@ -111,14 +111,14 @@ protected:
|
|||||||
compressed_buffer + COMPRESSED_BLOCK_HEADER_SIZE, to,
|
compressed_buffer + COMPRESSED_BLOCK_HEADER_SIZE, to,
|
||||||
static_cast<int>(size_decompressed)) < 0)
|
static_cast<int>(size_decompressed)) < 0)
|
||||||
{
|
{
|
||||||
throw Exception("Cannot LZ4_decompress_fast", ErrorCodes::CANNOT_DECOMPRESS);
|
throw Exception(ErrorCodes::CANNOT_DECOMPRESS, "Cannot LZ4_decompress_fast");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LZ4::decompress(compressed_buffer + COMPRESSED_BLOCK_HEADER_SIZE, to, size_compressed_without_checksum, size_decompressed, perf_stat);
|
LZ4::decompress(compressed_buffer + COMPRESSED_BLOCK_HEADER_SIZE, to, size_compressed_without_checksum, size_decompressed, perf_stat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw Exception("Unknown compression method: " + toString(method), ErrorCodes::UNKNOWN_COMPRESSION_METHOD);
|
throw Exception(ErrorCodes::UNKNOWN_COMPRESSION_METHOD, "Unknown compression method: {}", toString(method));
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user