-
Notifications
You must be signed in to change notification settings - Fork 119
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
Is threads > 0 supported? #197
Comments
We run tests against ClickHouse Cloud with threads = 4. What type of errors are you seeing? Support for distributed tables is also experimental, so that might be related. |
First of all I often see this right after I do
Then often various steps will fail, and some steps will be skipped, that I dont see when running on a single thread. Here is one example of an error I never see singlethreaded:
Note that as far as I can tell there is no non-deterministic code in that model, it is just a time-aggregation on another CH table, configured as:
|
It would be useful to understand (maybe from the ClickHouse logs?) what the exception is for the create database DDL query. It seems like it might be permissions related. Certain incremental materializations using "lightweight deletes" with the Are there any additional exceptions available in the ClickHouse server or query logs? |
Sorry for the delay getting back, but this is an error from the clickhouse log at the time of the iniital error:
I should mention also that we are running against a cluster of one shard consisting of two replicas. |
For the non-deterministic error, I should also mention that this incremental materialization is based off a remote view to another clickhouse instance. Im not sure if this is relevant though. i.e. https://clickhouse.com/docs/en/sql-reference/table-functions/remote |
Ah, the DATABASE ALREADY EXISTS error is a pretty obvious bug in the way that the client handles creating a database on startup for clusters. If the database exists on one replica but not the one that is checked, it runs the CREATE DATABASE ON CLUSTER incorrectly. I'll have to give it some thought but that should be a pretty easy fix. The fact that you're doing something off of a Remote table function may in fact be contributing to the other weird error. I know it's unlikely but if you could find a reproducible example it might be possible to track down. |
Ill try to find some time to create an example. |
For those who have this issue like me. Set allow_nondeterministic_mutations = 1 in user profile will make it work. https://clickhouse.com/docs/en/operations/settings/settings#allow_nondeterministic_mutations |
I should also point out that this has recently been occurring on a single thread. So I think this is not related to multiple threads as first thought. |
If you are continuing to get this error:
I believe @supnobita's suggestion should provide a valid workaround if you make sure the active profile has Similarly, ensuring that the dbt database already exists on all nodes should also fix the initial create database error. For similar reasons this is difficult to ensure from |
Just to be clear, the |
As of version 1.7.1 there are now some prechecks in place to ensure the database exists on the entire cluster and that nondeterministic mutations are allowed in connection with the delete+insert strategy. |
We have a clickhouse cluster with more than one node.
Hi I have adbt pipeline which works fine with threads = 1, but yields a variety of irregular errors when I run with threads > 1. Is this expected to work?
The text was updated successfully, but these errors were encountered: