Skip to content

Commit 9d2563d

Browse files
Adjust limits only for fast builds
1 parent ddfe6e4 commit 9d2563d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

tests/config/install.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,20 @@ function check_clickhouse_version()
4141
fi
4242
}
4343

44+
function is_fast_build()
45+
{
46+
return $(clickhouse local --query "SELECT value NOT LIKE '%-fsanitize=%' AND value LIKE '%-DNDEBUG%' FROM system.build_options WHERE name = 'CXX_FLAGS'")
47+
}
48+
4449
echo "Going to install test configs from $SRC_PATH into $DEST_SERVER_PATH"
4550

4651
mkdir -p $DEST_SERVER_PATH/config.d/
4752
mkdir -p $DEST_SERVER_PATH/users.d/
4853
mkdir -p $DEST_CLIENT_PATH
4954

50-
### WHEN ADDING A NEW CONFIG OR CHANGING THE EXISTING ONE,
51-
### YOU SHOULD CHECK CLICKHOUSE VERSION SO THAT YOU WON'T
52-
### BREAK VALIDATIONS USING PREVIOUS CH VERSION (LIKE BUGFIX VALIDATION).
55+
# When adding a new config or changing the existing one,
56+
# you should check clickhouse version so that you won't
57+
# break validations using previous ClickHouse version (like bugfix validation).
5358

5459
ln -sf $SRC_PATH/config.d/tmp.xml $DEST_SERVER_PATH/config.d/
5560
ln -sf $SRC_PATH/config.d/zookeeper_write.xml $DEST_SERVER_PATH/config.d/
@@ -136,6 +141,9 @@ ln -sf $SRC_PATH/users.d/nonconst_timezone.xml $DEST_SERVER_PATH/users.d/
136141
ln -sf $SRC_PATH/users.d/allow_introspection_functions.yaml $DEST_SERVER_PATH/users.d/
137142
ln -sf $SRC_PATH/users.d/replicated_ddl_entry.xml $DEST_SERVER_PATH/users.d/
138143
ln -sf $SRC_PATH/users.d/limits.yaml $DEST_SERVER_PATH/users.d/
144+
if [[ $(is_fast_build) == 1 ]]; then
145+
ln -sf $SRC_PATH/users.d/limits_fast.yaml $DEST_SERVER_PATH/users.d/
146+
fi
139147
if check_clickhouse_version 25.4; then
140148
ln -sf $SRC_PATH/users.d/max_cpu_load.xml $DEST_SERVER_PATH/users.d/
141149
fi

tests/config/users.d/limits.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ profiles:
2020
max_bytes_to_sort: 10G
2121
max_result_rows: 1G
2222
max_result_bytes: 1G
23-
max_execution_time: 60
24-
max_execution_time_leaf: 60
2523
max_execution_speed: 100G
2624
max_execution_speed_bytes: 10T
2725
timeout_before_checking_execution_speed: 300
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
profiles:
2+
default:
3+
max_execution_time: 60
4+
max_execution_time_leaf: 60

0 commit comments

Comments
 (0)