mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix tests
This commit is contained in:
parent
e8e9d0311a
commit
9d5b2023e8
@ -82,8 +82,6 @@ CheckResults FileChecker::check() const
|
||||
|
||||
void FileChecker::repair()
|
||||
{
|
||||
initialize();
|
||||
|
||||
for (const auto & name_size : map)
|
||||
{
|
||||
const String & name = name_size.first;
|
||||
|
@ -205,6 +205,7 @@ public:
|
||||
if (!done)
|
||||
{
|
||||
/// Rollback partial writes.
|
||||
LOG_WARNING(storage.log, "Rollback partial writes");
|
||||
streams.clear();
|
||||
storage.file_checker.repair();
|
||||
}
|
||||
@ -326,12 +327,12 @@ void TinyLogBlockOutputStream::writeSuffix()
|
||||
for (auto & pair : streams)
|
||||
column_files.push_back(storage.files[pair.first].data_file_path);
|
||||
|
||||
streams.clear();
|
||||
done = true;
|
||||
|
||||
for (const auto & file : column_files)
|
||||
storage.file_checker.update(file);
|
||||
storage.file_checker.save();
|
||||
|
||||
streams.clear();
|
||||
done = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ function test_func()
|
||||
|
||||
$CLICKHOUSE_CLIENT --query "SELECT count(), sum(x + y + z) FROM log" > "${CLICKHOUSE_TMP}"/select_result 2>&1;
|
||||
|
||||
grep -o -F 'File not found' "${CLICKHOUSE_TMP}"/select_result || cat "${CLICKHOUSE_TMP}"/select_result
|
||||
cat "${CLICKHOUSE_TMP}"/select_result
|
||||
|
||||
[[ $MAX_MEM -gt 200000000 ]] && break;
|
||||
done
|
||||
@ -33,9 +33,9 @@ function test_func()
|
||||
$CLICKHOUSE_CLIENT --query "DROP TABLE log";
|
||||
}
|
||||
|
||||
test_func TinyLog | grep -v -P '^(Memory limit|0\t0|File not found|[1-9]000000\t)'
|
||||
test_func StripeLog | grep -v -P '^(Memory limit|0\t0|File not found|[1-9]000000\t)'
|
||||
test_func Log | grep -v -P '^(Memory limit|0\t0|File not found|[1-9]000000\t)'
|
||||
test_func TinyLog | grep -v -P '^(Memory limit|0\t0|[1-9]000000\t)'
|
||||
test_func StripeLog | grep -v -P '^(Memory limit|0\t0|[1-9]000000\t)'
|
||||
test_func Log | grep -v -P '^(Memory limit|0\t0|[1-9]000000\t)'
|
||||
|
||||
rm "${CLICKHOUSE_TMP}/insert_result"
|
||||
rm "${CLICKHOUSE_TMP}/select_result"
|
||||
|
Loading…
Reference in New Issue
Block a user