Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max_parallel_replicas delivers incorrect result for tables without sampling. #5733

Closed
den-crane opened this issue Jun 24, 2019 · 2 comments · Fixed by #16675
Closed

max_parallel_replicas delivers incorrect result for tables without sampling. #5733

den-crane opened this issue Jun 24, 2019 · 2 comments · Fixed by #16675
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@den-crane
Copy link
Contributor

den-crane commented Jun 24, 2019

19.8.3.8

I have a cluster configured as 1 shard with 6 replicas.

<replicated>
    <shard>
        <internal_replication>true</internal_replication>
        <replica><host>host1</host><port>9000</port></replica>
        <replica><host>host2</host><port>9000</port></replica>
        <replica><host>host3</host><port>9000</port></replica>
        <replica><host>host4</host><port>9000</port></replica>
        <replica><host>host5</host><port>9000</port></replica>
        <replica><host>host6</host><port>9000</port></replica>
    </shard>
</replicated>

At each node

create table max_p_test(a Int64) Engine=MergeTree order by a;
insert into max_p_test values(1);

At the first node

CREATE TABLE max_p_test_d as max_p_test
ENGINE = Distributed (replicated,currentDatabase(),'max_p_test');
SELECT *
FROM max_p_test_d

┌─a─┐
│ 1 │
└───┘

SET max_parallel_replicas = 10, prefer_localhost_replica = 0

SELECT *
FROM max_p_test_d

┌─a─┐
│ 1 │
└───┘
┌─a─┐
│ 1 │
└───┘
┌─a─┐
│ 1 │
└───┘
┌─a─┐
│ 1 │
└───┘
┌─a─┐
│ 1 │
└───┘
┌─a─┐
│ 1 │
└───┘

6 rows in set. Elapsed: 0.009 sec.
@den-crane den-crane added the bug Confirmed user-visible misbehaviour in official release label Jun 24, 2019
@alexey-milovidov
Copy link
Member

It should not work without sampling at all.

@den-crane
Copy link
Contributor Author

the same behavior 19.13.7.57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants