Skip to content

Commit 2c5710d

Browse files
authored
Merge pull request ClickHouse#78721 from azat/ci/bugfix-fix-2
ci: fix bufix check (due to an error for version comparison)
2 parents 936bbc7 + ddf961d commit 2c5710d

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

tests/config/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ function check_clickhouse_version()
3030
{
3131
local required_version=$1 && shift
3232
# ClickHouse local version 25.4.1.1.
33-
current_version=$(clickhouse --version | awk '{print $NF}')
33+
# ClickHouse local version 25.4.1.1 (official build).
34+
current_version=$(clickhouse --version | awk '{print $4}')
3435

3536
if [ "$(printf '%s\n' "$required_version" "$current_version" | sort -V | head -n1)" = "$required_version" ]; then
3637
echo "ClickHouse version $current_version is OK (>= $required_version)"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
prefer_localhost_replica=1
2+
1
3+
2
4+
2
5+
prefer_localhost_replica=0
16
1
27
2
38
2
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
-- Tags: long, zookeeper
1+
-- Tags: zookeeper
22

33
-- Check that settings are correctly passed through Distributed table
44
DROP TABLE IF EXISTS simple;
55
CREATE TABLE simple (d Int8) ENGINE = ReplicatedMergeTree('/clickhouse/{database}/test_00563/tables/simple', '1') ORDER BY d;
66

7-
-- TODO: replace '127.0.0.2' -> '127.0.0.1' after a fix
8-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (1);
9-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (1);
10-
11-
SET insert_deduplicate=0;
12-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (2);
13-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (2);
7+
SELECT 'prefer_localhost_replica=1';
8+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=1 VALUES (1);
9+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=1 VALUES (1);
10+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=0 VALUES (2);
11+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=0 VALUES (2);
12+
SELECT * FROM remote('127.0.0.1', currentDatabase(), 'simple') ORDER BY d;
1413

14+
SELECT 'prefer_localhost_replica=0';
15+
TRUNCATE TABLE simple;
16+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=1 VALUES (1);
17+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=1 VALUES (1);
18+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=0 VALUES (2);
19+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=0 VALUES (2);
1520
SELECT * FROM remote('127.0.0.2', currentDatabase(), 'simple') ORDER BY d;
1621
DROP TABLE simple;

0 commit comments

Comments
 (0)