ClickHouse / ClickHouse/ClickHouse

Can't read from temporary table with enabled parallel replicas

Open
#74,229 0 comments 0 reactions 0 assignees View on GitHub
bug comp-parallel-replicas minor
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

Repro
```
set enable_parallel_replicas=1;
CREATE TEMPORARY TABLE readonly00542 (
ID Int
) Engine = MergeTree ORDER BY tuple();

INSERT INTO readonly00542 (ID)
VALUES (1), (2), (3), (4), (5);

SELECT ID FROM readonly00542 ORDER BY ID;
```

Error
```
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.767107 [ 35991 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} ReadFromParallelRemoteReplicasStep: There is no table `_temporary_and_external_tables`.`_tmp_f080bc5f-7f40-4798-bdbf-792affa89db0` on server: localhost:9000
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.767409 [ 35991 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} ReadFromParallelRemoteReplicasStep: There is no table `_temporary_and_external_tables`.`_tmp_f080bc5f-7f40-4798-bdbf-792affa89db0` on server: 127.0.0.2:9000
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.767593 [ 35991 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} ReadFromParallelRemoteReplicasStep: There is no table `_temporary_and_external_tables`.`_tmp_f080bc5f-7f40-4798-bdbf-792affa89db0` on server: 127.0.0.3:9000
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.767737 [ 35991 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} ReadFromParallelRemoteReplicasStep: There is no table `_temporary_and_external_tables`.`_tmp_f080bc5f-7f40-4798-bdbf-792affa89db0` on server: 127.0.0.4:9000
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.767883 [ 35991 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} ReadFromParallelRemoteReplicasStep: There is no table `_temporary_and_external_tables`.`_tmp_f080bc5f-7f40-4798-bdbf-792affa89db0` on server: 127.0.0.5:9000
2025-01-07 00:22:34 [1c2c8eef6f37] 2025.01.06 16:52:34.774316 [ 42058 ] {abc50bbe-ad03-4c84-9067-ef0c501de2cd} executeQuery: Code: 279. DB::Exception: Can't connect to any replica chosen for query execution: While executing Remote. (ALL_CONNECTION_TRIES_FAILED) (version 25.1.1.1927 (official build)) (from [::1]:51598) (comment: 00542_access_to_temporary_table_in_readonly_mode.sql) (in query: SELECT ID FROM readonly00542 ORDER BY ID;), Stack trace (when copying this message, always include the lines below):
```

Affected tests
```
00600_create_temporary_table_if_not_exists
00542_access_to_temporary_table_in_readonly_mode
03156_nullable_number_tips
03143_cte_scope
02995_bad_formatting_union_intersect
03045_unknown_identifier_alias_substitution
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.