From 32da588d5e85264ef678e05b0e3cef4751f14f8a Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 26 Nov 2023 05:57:54 +0300 Subject: [PATCH] Revert "Add debugging info for 01600_parts_types_metrics on failures" --- .../01600_parts_types_metrics.reference | 3 -- .../0_stateless/01600_parts_types_metrics.sh | 53 ------------------- 2 files changed, 56 deletions(-) delete mode 100644 tests/queries/0_stateless/01600_parts_types_metrics.reference delete mode 100755 tests/queries/0_stateless/01600_parts_types_metrics.sh diff --git a/tests/queries/0_stateless/01600_parts_types_metrics.reference b/tests/queries/0_stateless/01600_parts_types_metrics.reference deleted file mode 100644 index e8183f05f5d..00000000000 --- a/tests/queries/0_stateless/01600_parts_types_metrics.reference +++ /dev/null @@ -1,3 +0,0 @@ -1 -1 -1 diff --git a/tests/queries/0_stateless/01600_parts_types_metrics.sh b/tests/queries/0_stateless/01600_parts_types_metrics.sh deleted file mode 100755 index d4ffbfed613..00000000000 --- a/tests/queries/0_stateless/01600_parts_types_metrics.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -# Tags: no-s3-storage, no-asan, long, no-parallel - -CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# shellcheck source=../shell_config.sh -. "$CURDIR"/../shell_config.sh - -set -e -set -o pipefail - -# The query is not atomic - it can compare states between system.parts and system.metrics from different points in time. -# So, there is inherent race condition (especially in fasttest that runs tests in parallel). -# -# But it should get the expected result eventually. -# In case of test failure, this code will do infinite loop and timeout. -verify() -{ - for ((i = 0; i < 100; ++i)); do - # NOTE: database = $CLICKHOUSE_DATABASE is unwanted - result=$( $CLICKHOUSE_CLIENT -m --query "SELECT - (SELECT sumIf(value, metric = 'PartsCompact'), sumIf(value, metric = 'PartsWide') FROM system.metrics) = - (SELECT countIf(part_type = 'Compact'), countIf(part_type = 'Wide') FROM (SELECT part_type FROM system.parts UNION ALL SELECT part_type FROM system.projection_parts))") - if [ "$result" = "1" ]; then - echo 1 - return - fi - sleep 0.1 - done - - echo "ERROR: metrics does not match:" >&2 - $CLICKHOUSE_CLIENT -nm --query " - -- { echo } - SELECT sumIf(value, metric = 'PartsCompact'), sumIf(value, metric = 'PartsWide') FROM system.metrics; - SELECT countIf(part_type = 'Compact'), countIf(part_type = 'Wide') FROM (SELECT part_type FROM system.parts UNION ALL SELECT part_type FROM system.projection_parts); - " -} - -$CLICKHOUSE_CLIENT --database_atomic_wait_for_drop_and_detach_synchronously=1 --query="DROP TABLE IF EXISTS data_01600" -# Compact - (5..10] -# Wide - >10 -$CLICKHOUSE_CLIENT --query="CREATE TABLE data_01600 (part_type String, key Int) ENGINE = MergeTree PARTITION BY part_type ORDER BY key SETTINGS min_bytes_for_wide_part=0, min_rows_for_wide_part=10, index_granularity = 8192, index_granularity_bytes = '10Mi'" - -# Compact -$CLICKHOUSE_CLIENT --query="INSERT INTO data_01600 SELECT 'Compact', number FROM system.numbers LIMIT 6" -verify - -# Wide -$CLICKHOUSE_CLIENT --query="INSERT INTO data_01600 SELECT 'Wide', number FROM system.numbers LIMIT 11 OFFSET 6" -verify - -# DROP and check -$CLICKHOUSE_CLIENT --database_atomic_wait_for_drop_and_detach_synchronously=1 --query="DROP TABLE data_01600" -verify