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

ON CLUSTER syntax makes the query execution hang #27

Open
databrecht opened this issue Mar 13, 2019 · 1 comment
Open

ON CLUSTER syntax makes the query execution hang #27

databrecht opened this issue Mar 13, 2019 · 1 comment

Comments

@databrecht
Copy link

databrecht commented Mar 13, 2019

I've set up multiple 'replicas' and 'shards' with docker compose. If you use the clickhouse 'ON CLUSTER' syntax, clickhouse sends back a simple text (not json) which contains the information about the replicas. The library expects JSON but does not handle this gracefully. The result is that the response will never come since no 'end' or 'error' is send.

What clickhouse sends back:
clickhouse-shard1-replica1 9000 0 3 0
clickhouse-shard2-replica1 9000 0 2 0
clickhouse-shard2-replica2 9000 0 1 0
clickhouse-shard1-replica2 9000 0 0 0

In order to send an end an just make it work (without providing results) I assume you need to add a stream.push(null) in clickhouse.js at line 160. I don't know how you want to tackle something like that though.

@apla
Copy link
Owner

apla commented May 8, 2019

I don't have a cluster, so you can provide response from cluster or (even better) make PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants